drx runs CLI tools on demand, similar to npx / uvx.
- Use
pub.devpackages when Dart SDK is available. - Use GitHub release binaries when Dart SDK is not available.
dart pub global activate drx
drx --versionIf PATH is not set for pub executables:
dart pub global run drx:drx --versionLinux / macOS:
curl -fsSL "https://raw.githubusercontent.com/leehack/drx/main/tool/install.sh" | DRX_REPO=leehack/drx shWindows (PowerShell):
$env:DRX_REPO = "leehack/drx"
iwr "https://raw.githubusercontent.com/leehack/drx/main/tool/install.ps1" -UseBasicParsing | iexBoth installers verify checksums before installing.
Default source is pub:
drx <package[@version]> [--] [args...]
drx <package:executable[@version]> [--] [args...]Explicit source selection:
drx --from pub:<package[@version]> <command> [--] [args...]
drx --from gh:<owner>/<repo[@tag]> <command> [--] [args...]
# Optional for gh source: --gh-mode binary|source|auto --git-path <path>Examples:
drx melos -- --version
drx mason_cli:mason -- --help
drx --from pub:very_good_cli very_good -- --help
drx --from gh:cli/cli@v2.70.0 gh -- version
drx --from gh:BurntSushi/ripgrep rg -- --version
drx --from gh:junegunn/fzf fzf -- --version
drx --from gh:charmbracelet/gum gum -- --version
# Run a Dart CLI directly from GitHub source:
drx --gh-mode source --from gh:leehack/mcp_dart@mcp_dart_cli-v0.1.6 --git-path packages/mcp_dart_cli mcp_dart_cli:mcp_dart -- --help
# Try release binary first, then fallback to source mode:
drx --gh-mode auto --from gh:leehack/mcp_dart@mcp_dart_cli-v0.1.6 --git-path packages/mcp_dart_cli mcp_dart -- --help
# Some repos do not publish checksums:
drx --allow-unsigned --from gh:sharkdp/fd fd -- --versiondrx cache list
drx cache clean
drx cache prune --max-age-days 30 --max-size-mb 2048
drx versions melos --limit 5
drx versions gh:cli/cli --limit 10
drx --json versions gh:cli/cli
drx --json cache list--runtime auto(default): try AOT first, fallback to JIT--runtime jit:dart run--runtime aot: compile and run native executable
These runtime modes apply to pub: and gh: when execution is from Dart source
(--gh-mode source, or --gh-mode auto when it falls back to source mode).
- GitHub assets require checksum verification by default.
- Unsigned assets are blocked unless you pass
--allow-unsigned.
--gh-mode auto(default forgh:): try precompiled release assets first, then fallback to source mode when no compatible binary is available.--gh-mode binary: run precompiled release assets only.--gh-mode source: run Dart CLI from GitHub source via sandboxeddart pub getand runtime selection (jit/aot/auto).--git-path <path>selects a package path inside a monorepo for source mode.
- Linux:
x64,arm64 - macOS:
x64(Intel),arm64(Apple Silicon) - Windows:
x64,arm64
- Tool maintainer compatibility guide:
doc/compatibility.md - Project maintenance / release notes:
doc/maintainers.md