11# ` cargox `
22
33[ ![ CI] ( https://github.com/mxcl/cargox/actions/workflows/ci.yml/badge.svg )] ( https://github.com/mxcl/cargox/actions/workflows/ci.yml )
4+ [ ![ Crates.io] ( https://img.shields.io/crates/v/cargox-cli.svg )] ( https://crates.io/crates/cargox-cli )
45
56` cargox ` runs Rust binaries on demand, installing them automatically if necessary.
67It mirrors the convenience of ` npx ` for the Cargo ecosystem while prioritising
78` cargo-binstall ` to download prebuilt executables whenever possible.
89
10+ ## Installation
11+
12+ We recommend installing cargo-binstall as well, this significantly speeds up
13+ use of ` cargox ` :
14+
15+ ``` sh
16+ cargo install cargo-binstall
17+ cargo binstall cargox-cli
18+ ```
19+
20+ If you don’t want that then you can just ` cargo install cargox-cli ` .
21+
922## Features
1023
1124- Executes ` crate[@version] ` binaries, installing them on demand.
@@ -21,21 +34,26 @@ cargox <crate[@version]> [--] [binary-args...]
2134Examples:
2235
2336``` bash
24- # Run the latest wasm-pack, installing it if necessary
25- cargox bat ./README.md
37+ # Run the latest bat that is installed or installing the latest bat if necessary
38+ $ cargox bat ./README.md
39+
40+ $ cargox bat@latest ./README.md
41+ # If the installed bat is old we only check for newer if you do this.
42+ # This is how every foo*x* tool works. We are not being different.
2643
2744# Install and run a pinned version
28- cargox cargo-deny@0.16.3 check
45+ $ cargox cargo-deny@0.16.3 check
2946
3047# Force a reinstall, building from source instead of using cargo-binstall
31- cargox --force --build-from-source cargo-nextest
48+ $ cargox --force --build-from-source cargo-nextest
49+ # ^^ shorter: cargox -fs cargo-nextest
3250```
3351
3452> [ !TIP]
3553>
3654> - Arguments before the first positional are passed to ` cargox ` .
37- > - Arguments after ` -- ` are passed to the invoked binary.
38- > - Use ` -- ` if necessary to define the separation point.
55+ > - Arguments after the positional argument are passed to the invoked binary.
56+ > - You can use ` -- ` if necessary to define this separation point.
3957
4058### Flags
4159
0 commit comments