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.
- Concurrent PATH scanning - Parallel directory traversal (because why not)
- Colorized output - Visual distinction between executables and symlinks
- Detailed file information - Permissions, sizes, and modification times
- Symlink resolution - See where those links actually point
- Duplicate detection - Identify and filter duplicate PATH entries
- Performance statistics - Detailed timing and search metrics
- JSON output - Machine-readable output for automation
cargo install --path .Installs both whence and wnc binaries.
Find a command:
whence cargoShow all matches in PATH:
whence -a python3Display detailed file information:
whence -l cargo
# rwxr-xr-x 7.2M Jan 15 22:35 /Users/you/.cargo/bin/cargoResolve symbolic links:
whence -L python3
# /opt/homebrew/bin/python3
# └→ /opt/homebrew/Cellar/[email protected]/3.13.5/Frameworks/Python.framework/Versions/3.13/bin/python3.13Remove duplicate results:
whence -a -u python3Show performance metrics:
whence --stats cargoOutput as JSON:
whence --json -l -L python3Roughly 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 enabledMIT or Apache 2.0, your choice.