Run any crate binary instantly — no cargo install, no compile wait, no ceremony.
crgx <crate> [args...]crgx is the npx equivalent for the Rust ecosystem. It fetches pre-built binaries, caches them locally, and executes them in a single command — no compilation required. Any crate that works with cargo-binstall works with crgx automatically.
- No compilation — downloads pre-built binaries in seconds instead of compiling for minutes
- No global install — binaries live in crgx's own cache, not
~/.cargo/bin - One command —
crgx <crate>resolves, downloads, caches, and runs - Works offline — falls back to cached binaries when the network is unavailable
- MCP-ready — drop
crgx <server>into any MCP config with zero setup
| Tool | What it does | Compile? | Global install? | One command? |
|---|---|---|---|---|
| crgx | Fetch + cache + run pre-built binary | No | No (own cache) | Yes |
cargo install |
Compile from source, install to ~/.cargo/bin | Yes (slow) | Yes | Yes |
cargo binstall |
Install pre-built binary to ~/.cargo/bin | No | Yes | Yes |
| npx (Node.js) | Run npm package binary | N/A | No | Yes |
| Platform | Command |
|---|---|
| macOS (Homebrew) | brew install yfedoseev/tap/crgx |
| Linux / macOS (shell) | curl -fsSL crgx.dev/install.sh | sh |
| Windows (PowerShell) | irm crgx.dev/install.ps1 | iex |
| Any (Cargo) | cargo install crgx |
Or download pre-built binaries from GitHub Releases.
crgx [FLAGS] <crate>[@<version>] [tool-args...]
Everything after the crate specifier is passed directly to the tool:
crgx tokei . # count lines of code
crgx hyperfine "echo hello" # benchmark a command
crgx dust . # disk usage overview
crgx cargo-audit # security audit
crgx sd 'before' 'after' *.md # find & replace
crgx ripgrep -i "TODO" src/ # search filescrgx tokei@14.0.0 . # exact version (cached forever)
crgx tokei@latest . # force latest from registry
crgx tokei . # latest, with 24h staleness check{
"command": "crgx",
"args": ["fossil-mcp"]
}Drop into any MCP config. No pre-install step. crgx downloads automatically without prompting, like uvx.
- run: crgx cargo-tarpaulin -- --out xmlNo cargo install step burning CI minutes.
| Flag | Description |
|---|---|
-v, --verbose |
Show detailed progress and resolution info |
--allow-build |
Allow compiling from source if no pre-built binary found |
--bin <name> |
Specify which binary to run (for multi-binary crates) |
--offline |
Only run if already cached; no network access |
crgx --cache-list # show cached binaries
crgx --cache-clean # remove all cached binaries
crgx --cache-dir # print cache directory path| OS | Cache path |
|---|---|
| Linux | ~/.cache/crgx/ |
| macOS | ~/Library/Caches/crgx/ |
| Windows | %LOCALAPPDATA%\crgx\cache |
Exact versions (tool@1.2.3) are cached forever. Unversioned calls use a 24h staleness window.
crgx tries each source in order to find a pre-built binary:
- Local cache — instant if already downloaded
- Binstall metadata — reads the crate author's download URL from Cargo.toml metadata
- GitHub Releases — matches a release asset by your target triple
- QuickInstall — falls back to cargo-quickinstall's pre-built binary registry
- cargo build — opt-in with
--allow-build, compiles from source as a last resort
Any crate that works with cargo binstall works with crgx automatically.
On first run, crgx resolves the crate from crates.io, downloads a pre-built binary, caches it, and exec()s it. The crgx process is replaced entirely — zero overhead, signals pass through, exit codes are preserved.
Subsequent runs hit the cache and execute immediately.
See CONTRIBUTING.md for development setup and guidelines.
MIT — see LICENSE for details.