Homebrew
The macOS package manager
Homebrew is the package manager no developer Mac goes without. It installs CLI tools (formulae) and GUI apps (casks) with one command, neatly under /opt/homebrew. Upgrading everything is a single brew upgrade. Every app in this directory is annotated with its brew token.
// What it is for
- One command installs and updates everything: CLI tools (formulae) and GUI apps (casks) alike
- A Brewfile describes the whole machine as text — a new Mac comes up with a single brew bundle
- brew upgrade updates everything installed through brew instead of a dozen separate updaters
- Everything lives in one prefix and uninstalls as cleanly as it installed
// Common questions
Should I run brew with sudo?
No, and it matters: Homebrew deliberately installs into a directory your user owns. Installing formulae under sudo breaks file ownership and produces permission errors you will have to repair by hand later.
What is the difference between a formula and a cask?
A formula is a command-line program built for Homebrew (git, jq, ripgrep). A cask is a regular macOS app from the vendor that Homebrew downloads and drops into /Applications. The commands differ: brew install git versus brew install --cask raycast.
