Homebrew package manager for macOS. Search, install, manage, and troubleshoot packages and casks.
Install
Documentation
Homebrew Package Manager
Complete Homebrew command reference and usage guide for installing, managing, and troubleshooting macOS packages.
When to Use
- -Installing packages or applications (
brew install X) - -Searching for available packages (
brew search X) - -Updating and upgrading existing packages
- -Checking package information and dependencies
- -Troubleshooting installation issues
- -Managing installed packages
Command Reference
Package Search & Information
#### brew search TEXT|/REGEX/
brew search python
brew search /^node/
#### brew info [FORMULA|CASK...]
brew info python
brew info chrome google-chrome
Installation & Upgrades
#### brew install FORMULA|CASK...
- -FORMULA = command-line tools (installed to /usr/local/bin)
- -CASK = GUI applications (installed to /Applications)
- -Can install multiple at once:
brew install git python nodejs
brew install python
brew install google-chrome # installs as cask
brew install git python nodejs
#### brew update
brew update
#### brew upgrade [FORMULA|CASK...]
- -Without args: upgrades all outdated packages
- -With args: upgrades only specified packages
brew upgrade # upgrade all outdated packages
brew upgrade python # upgrade just python
brew upgrade python git # upgrade multiple
Package Management
#### brew uninstall FORMULA|CASK...
brew uninstall python
brew uninstall google-chrome
#### brew list [FORMULA|CASK...]
brew list # show all installed packages
brew list python # show files installed by python
Configuration & Troubleshooting
#### brew config
- -Installation path
- -Xcode location
- -Git version
- -CPU architecture
brew config
#### brew doctor
brew doctor
#### brew install --verbose --debug FORMULA|CASK
brew install --verbose --debug python
Advanced Usage
#### brew create URL [--no-fetch]
- -
--no-fetch= don't download source immediately
brew create https://example.com/package.tar.gz
#### brew edit [FORMULA|CASK...]
brew edit python
#### brew commands
brew commands
#### brew help [COMMAND]
brew help install
brew help upgrade
Quick Reference
| Task | Command |
|------|---------|
| Search for package | brew search TEXT |
| Get package info | brew info FORMULA |
| Install package | brew install FORMULA |
| Install app | brew install CASK |
| Update package list | brew update |
| Upgrade all packages | brew upgrade |
| Upgrade specific package | brew upgrade FORMULA |
| Remove package | brew uninstall FORMULA |
| List installed | brew list |
| Check config | brew config |
| Troubleshoot | brew doctor |
Common Workflows
Installing a New Package
1. Search: brew search python
2. Get info: brew info python@3.11
3. Install: brew install python@3.11
Troubleshooting Installation
1. Check config: brew config
2. Run doctor: brew doctor
3. Retry with debug: brew install --verbose --debug FORMULA
Maintaining Homebrew
1. Update: brew update
2. Check what's outdated: brew upgrade (shows what would upgrade)
3. Upgrade all: brew upgrade
Key Concepts
FORMULA: Command-line tools and libraries (e.g., python, git, node) CASK: GUI applications (e.g., google-chrome, vscode, slack) TAP: Third-party formula repositories (e.g.,brew tap homebrew/cask-versions)
Notes
- -All brew commands require Homebrew to be installed
- -Xcode Command Line Tools are required for building from source
- -Some packages may prompt for sudo password
- -Different packages have different installation times
- -Package names are case-insensitive but shown lowercase by convention
Resources
- -Official docs: https://docs.brew.sh
- -Formula documentation: https://github.com/Homebrew/homebrew-core
- -Cask documentation: https://github.com/Homebrew/homebrew-cask
Launch an agent with Homebrew Package Manager on Termo.