| Crates.io | whence |
| lib.rs | whence |
| version | 0.1.0 |
| created_at | 2025-10-25 22:34:34.375273+00 |
| updated_at | 2025-10-25 22:34:34.375273+00 |
| description | A modern which alternative with colors, symlink resolution, and parallel PATH scanning |
| homepage | https://github.com/JamesPatrickGill/whence |
| repository | https://github.com/JamesPatrickGill/whence |
| max_upload_size | |
| id | 1900759 |
| size | 41,007 |
A command-line tool for locating executables in your PATH, written in Rust.
Traditional which implementations work fine. This one has colors and uses threads.
cargo install --path .
Installs both whence and wnc binaries.
Find a command:
whence cargo
Show all matches in PATH:
whence -a python3
Display detailed file information:
whence -l cargo
# rwxr-xr-x 7.2M Jan 15 22:35 /Users/you/.cargo/bin/cargo
Resolve symbolic links:
whence -L python3
# /opt/homebrew/bin/python3
# └→ /opt/homebrew/Cellar/python@3.13/3.13.5/Frameworks/Python.framework/Versions/3.13/bin/python3.13
Remove duplicate results:
whence -a -u python3
Show performance metrics:
whence --stats cargo
Output as JSON:
whence --json -l -L python3
Roughly 3x slower than which. The extra features come at a cost.
Benchmark 1: whence cargo
Time (mean ± σ): 2.5 ms ± 3.1 ms
Benchmark 2: which cargo
Time (mean ± σ): 783.5 µs ± 3411.4 µs
For interactive use, the difference is imperceptible. For tight loops, use which.
cargo test # Run tests
cargo build --release # Build optimized binary
cargo clippy # Pedantic mode enabled
MIT or Apache 2.0, your choice.