List every command-line tool you installed with Homebrew, npm and Cargo
By Flavio
Updated
Print what Homebrew, npm and Cargo installed, see why the counts don't match, and keep one catalog of every command on your Mac with CLI Tools Cabinet.
You installed a command-line tool for one job, and now you can’t remember its name. Homebrew has a list, npm has a list, Cargo has a list, and none of them know about the script you dropped in ~/.local/bin.
We’ll print the three lists first, with the real numbers from my Mac. Then we’ll put everything in one catalog with CLI Tools Cabinet.
Installing, updating and removing packages is in A practical guide to Homebrew. The short list of tools I open every day is in The CLI tools I use every day. This is about the long list I lose track of.
Print the three lists yourself
Start with Homebrew:
brew list --formula
On my Mac that prints 176 names. Most of them are libraries Homebrew pulled in for something else, like abseil and aom. To see only the formulae you asked for, add --installed-on-request:
brew list --installed-on-request
That’s 32. Add --versions to either command to get the version next to each name.
For the npm packages you installed globally:
npm list -g --depth=0
/opt/homebrew/lib
+-- @airtable/[email protected]
+-- @earendil-works/[email protected]
+-- @fission-ai/[email protected]
+-- @google/[email protected]
+-- @kilocode/[email protected]
The first line is the global prefix of the Node you’re running, here Homebrew’s. Another Node from a version manager has its own prefix and its own list. To check the version of a single package, see Find the installed version of an npm package.
Cargo lists the packages you installed with cargo install, and the commands each one added:
cargo install --list
mdbook v0.4.43:
mdbook
tauri-cli v2.10.1:
cargo-tauri
vimeo-cli v1.0.0 (/Users/flaviocopes/dev/vimeo-cli):
vimeo
Here’s how the counts compare on my Mac:
| Command | What it lists | Count |
|---|---|---|
brew list --formula | Every formula, dependencies included | 176 |
brew list --installed-on-request | Formulae I installed myself | 32 |
npm list -g --depth=0 | Global packages of the current Node, npm and corepack included | 29 |
cargo install --list | Packages from cargo install | 3 |
clitools stats | Commands from all of the above, plus ~/.local/bin and the rest of PATH | 133 |
Three formats, and still no view of ~/.local/bin.
Check which copy runs
The same command can be installed twice. type -a prints every copy your shell can find, in PATH order:
type -a codex
codex is /Users/flaviocopes/.local/bin/codex
codex is /opt/homebrew/bin/codex
On my Mac, the first one is Codex’s standalone installer and the second is the npm package. They aren’t even the same version:
/Users/flaviocopes/.local/bin/codex --version
/opt/homebrew/bin/codex --version
codex-cli 0.159.2
codex-cli 0.150.1
Typing codex runs the first one. Check type -a before you reinstall something, or you end up with a third copy and the old one still first in PATH.
Scan everything into one catalog
CLI Tools Cabinet runs on macOS 14 or later. Download the app zip from your Polar receipt, unzip it and drag it to Applications. The license key in the same receipt turns on automatic updates, from CLI Tools Cabinet → License….
The clitools command is built from the source zip in the receipt, with Xcode 26 or a Swift 6.2 toolchain. From the unzipped folder:
./Scripts/install-cli.sh
It builds clitools in that folder and links it into ~/.local/bin, so keep the folder where it is. Pass another directory as the first argument to link it somewhere else.
The app scans when it opens, every five minutes while it’s open, and each time you switch back to it. The Scan button in the toolbar scans right away. From the terminal:
clitools scan
Found 133 CLI tools (35 Homebrew, 32 npm, 4 Cargo, 58 Local, 4 PATH).
When something changed since the last scan, it adds a New: and a Gone: line with the names.

The numbers don’t match the three lists above, and that’s on purpose. Here’s what goes where:
- Homebrew is the formulae you installed on request that put a command in Homebrew’s
bin, plus casks that ship a command. The 144 dependency libraries stay out. - npm is the JavaScript bucket. It has the global npm packages minus
npmandcorepack, plus anything in a pnpm, Bun, Deno or Volta folder. That’s whybunanddenoshow up as npm on my Mac. - Cargo is everything in
~/.cargo/bin. That’s the threecargo installpackages plusrustup, which is how I get 4. - Local is any command that lives in your home folder, like
~/.local/binand~/bin. - PATH is the rest of your
PATHoutside the system folders, for metailscale,polar,moandmole.
The scan reads your login shell’s PATH, so a folder you add in your shell config shows up too. A package with several commands stays one row: the cf npm package on my Mac is one entry with cf and cloudflare as its commands.
The scan reads folders, Homebrew’s install receipts, brew info and cargo install --list, and never runs the tools it finds.
Read one source back out
The app and the CLI share one file, and clitools catalog-path prints it:
/Users/flaviocopes/Library/Application Support/CliTools/catalog.json
--source filters the list. It takes homebrew, npm, cargo, python, local and path:
clitools list --source cargo
cargo-tauri Cargo
mdbook Cargo
rustup Cargo
vimeo Cargo 0.1.0 Uploads and manages Vimeo videos, with appearance presets, folders, privacy and share links. Needs a Vimeo access token (vimeo login).
The version and the description only show up for tools you’ve inspected (more on that below). clitools stats prints the counts per source, and clitools list --names prints one name per line, for piping into grep or wc -l.
When you remember the job and not the name, search:
clitools search slideshow
postdeck Local 1.0.0 Builds slideshows in the Post Slide Deck app from posts on X, text slides and images.
Search matches names, commands, packages and descriptions, archived tools included.
Inspect one tool
Selecting a tool in the app inspects it. In the terminal, clitools inspect gh does the same. It runs the tool with --version and --help, asks Homebrew for the description and homepage, and downloads the tool’s tldr page if there is one. Inspect only tools you trust, since it runs them.
The results go into the catalog, so show reads them back without running anything:
clitools show gh
gh
GitHub command-line tool
Source: Homebrew
Version: gh version 2.93.0 (2026-05-27)
Path: /opt/homebrew/bin/gh
Resolves to: /opt/homebrew/Cellar/gh/2.93.0/bin/gh
Homepage: https://cli.github.com/
Installed: Jul 29, 2026
The examples follow, from the tldr page and the examples section of the tool’s own help. clitools examples gh prints only those. In the app, each one has a copy button.

Be careful with tools that share a name with another project. The tldr page is looked up by command name, so my Cloudflare cf command shows Cloud Foundry’s description and examples.
The Installed date comes from Homebrew’s install receipt for Homebrew tools. For everything else it’s the file’s creation date, so a copied script can look newer than it is.
Clean up the list
Star the tools you use often, from the app or with clitools favorite. Archive hides a tool from the default list and leaves the package installed. clitools restore brings it back.
To find candidates for removal:
clitools list --unused
That’s the tools that never appear in your zsh, bash or fish history. On my Mac it’s 48 of 133. A tool you only run from a script, an app or an agent counts as unused too, so read it as a list to check, not a list to delete. clitools list --sort usage orders everything by how often your history runs it.
Your history never goes into catalog.json, because the app reads the history files and keeps the result in memory. The catalog keeps your favorites, archived tools and inspected details, so back it up if you care about those.
If an agent needs to pick a tool from this catalog and check its flags, that’s in Help your coding agent find the CLI tools you already installed.
If something looks wrong
If clitools: command not found, ~/.local/bin isn’t in your PATH. The install script prints a note when that’s the case.
If a tool you installed this morning is missing, run clitools scan again. If it’s still missing, check that your login shell finds it with command -v, since the scan uses that shell’s PATH.
If the catalog shows a different version than the command you run, you probably have two copies. The catalog keeps one entry per command name, and on my Mac it lists the npm codex at 0.150.1 while my shell runs 0.159.2 from ~/.local/bin. type -a shows both.
Get CLI Tools Cabinet
Catalog tools from Homebrew, npm, Cargo, and your PATH, with examples, shell history, and a JSON CLI for coding agents.
See CLI Tools Cabinet → · Read the docs · $20. See the app page for tax details, with full source code.
Want me to talk about your product? You can sponsor this site.