Skip to content

Latest commit

 

History

History
108 lines (79 loc) · 2.57 KB

File metadata and controls

108 lines (79 loc) · 2.57 KB

Homebrew (brew install) — Band B, tier 5

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 Brewfile entry applied with brew bundle keeps the install tracked and reproducible; on a Nix or Guix host, prefer home.packages / a manifest instead. See declarative.md. For a one-off, use an ephemeral run (nix.md, guix.md) — no install at all.

Syntax

# Install
brew install <formula>

# Then run the binary
<binary> <args>

Key notes

  • No ephemeral-run equivalent. Every brew install persists until explicitly uninstalled.
  • Binary name usually matches the formula name.
  • On macOS, brew is 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.

Examples

# 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.py

Extras

Search

brew search <regex>
brew info <formula>

Pin a formula against upgrades

brew pin <formula>
brew unpin <formula>

Third-party taps

brew tap <owner>/<n>
brew install <owner>/<n>/<formula>

Upgrade an installed formula

brew upgrade <formula>
brew upgrade          # upgrade everything

Cleanup downloaded artifacts (keep formulae installed)

brew cleanup

Lookup

Cleanup

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).