Skip to content

Commit 5751a6c

Browse files
committed
README tweaks
1 parent 2083a41 commit 5751a6c

File tree

2 files changed

+22
-7
lines changed

2 files changed

+22
-7
lines changed

README.md

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,18 @@
66
It mirrors the convenience of `npx` for the Cargo ecosystem while prioritising
77
`cargo-binstall` to download prebuilt executables whenever possible.
88

9+
## Installation
10+
11+
We recommend installing cargo-binstall as well, this significantly speeds up
12+
use of `cargox`:
13+
14+
```sh
15+
cargo install cargo-binstall
16+
cargo binstall cargox-cli
17+
```
18+
19+
If you don’t want that then you can just `cargo install cargox-cli`.
20+
921
## Features
1022

1123
- Executes `crate[@version]` binaries, installing them on demand.
@@ -21,14 +33,19 @@ cargox <crate[@version]> [--] [binary-args...]
2133
Examples:
2234

2335
```bash
24-
# Run the latest wasm-pack, installing it if necessary
25-
cargox bat ./README.md
36+
# Run the latest bat that is installed or installing the latest bat if necessary
37+
$ cargox bat ./README.md
38+
39+
$ cargox bat@latest ./README.md
40+
# If the installed bat is old we only check for newer if you do this.
41+
# This is how every foo*x* tool works. We are not being different.
2642

2743
# Install and run a pinned version
28-
cargox cargo-deny@0.16.3 check
44+
$ cargox cargo-deny@0.16.3 check
2945

3046
# Force a reinstall, building from source instead of using cargo-binstall
31-
cargox --force --build-from-source cargo-nextest
47+
$ cargox --force --build-from-source cargo-nextest
48+
# ^^ shorter: cargox -fs cargo-nextest
3249
```
3350

3451
> [!TIP]

src/installer.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,7 @@ fn install_with_binstall(target: &Target, cli: &Cli, version: &Version) -> Resul
4242
cmd.arg("--quiet");
4343
}
4444
cmd.arg("--no-confirm");
45-
if cli.force {
46-
cmd.arg("--force");
47-
}
45+
cmd.arg("--force");
4846
if let Some(bin) = &cli.bin {
4947
cmd.arg("--bin");
5048
cmd.arg(bin);

0 commit comments

Comments
 (0)