Permanent install to a user-owned prefix (/opt/homebrew on macOS,
/home/linuxbrew/.linuxbrew on Linux). No sudo required after initial
Homebrew bootstrap. Large formula index (~7,000 CLI formulae plus macOS
casks).
Consent gate. This is a durable change to the user's machine. Propose it — the command, the prefix it installs into, the removal command (
brew uninstall <formula>), and the fact that it is untracked by any declarative config — then wait for the go-ahead.Declarative equivalent: a
Brewfileentry applied withbrew bundlekeeps the install tracked and reproducible; on a Nix or Guix host, preferhome.packages/ a manifest instead. See declarative.md. For a one-off, use an ephemeral run (nix.md, guix.md) — no install at all.
# Install
brew install <formula>
# Then run the binary
<binary> <args>- No ephemeral-run equivalent. Every
brew installpersists until explicitly uninstalled. - Binary name usually matches the formula name.
- On macOS,
brewis the dominant non-Apple package manager; on Linux it works but is a lower-priority choice than Guix/Nix. - Casks (
brew install --cask <cask>) are macOS-only GUI apps and should generally be avoided by this skill — prefer CLI formulae.
# Search a codebase with ripgrep
brew install ripgrep && rg 'TODO' src/
# Benchmark two commands
brew install hyperfine && hyperfine 'cmd_a' 'cmd_b'
# Static analysis of a shell script
brew install shellcheck && shellcheck script.sh
# Quick QEMU VM
brew install qemu && qemu-system-x86_64 -nographic -m 512 disk.img
# Specific Python version
brew install python@3.12 && python3.12 script.pybrew search <regex>
brew info <formula>brew pin <formula>
brew unpin <formula>brew tap <owner>/<n>
brew install <owner>/<n>/<formula>brew upgrade <formula>
brew upgrade # upgrade everythingbrew cleanup- Online: https://formulae.brew.sh/
- Casks (macOS GUI, usually skip): https://formulae.brew.sh/cask/
- CLI:
brew search <regex> - See lookup.md for details.
brew uninstall <formula>Tell the user what was installed and how to remove it — Homebrew is a permanent manager (Band B in the priority chain).