Homebrew is a free and open-source package manager for macOS and Linux that simplifies installing software from the command line. Its tagline — "The missing package manager for macOS" — perfectly captures its role as the first tool Mac developers install.
Why Homebrew Exists
macOS lacks a built-in package manager like Linux apt or Windows winget. Before Homebrew, installing developer tools meant downloading .dmg files, clicking through installers, and manually managing PATH variables. Homebrew automates all of this with simple commands.
Basic Usage
# Install Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Install packages
brew install node
brew install python
brew install git
brew install postgresql
# Search and info
brew search redis
brew info docker
# Update everything
brew update && brew upgrade
Formulae and Casks
- Formulae — Command-line tools and libraries (brew install wget)
- Casks — GUI applications (brew install --cask visual-studio-code)
- Services — Background services (brew services start postgresql)
Essential Developer Setup
A typical Mac developer setup script installs dozens of tools in minutes: Node.js, Python, Git, Docker, PostgreSQL, Redis, wget, jq, and VS Code — all via Homebrew. This reproducible setup is often scripted in dotfiles repositories for new machine provisioning.
Homebrew on Linux
Homebrew also runs on Linux (called Linuxbrew), installing packages to a user-writable directory without sudo. This is valuable on shared servers or systems where you lack admin privileges but need specific tool versions.
Pros
- Simple, consistent install commands
- Massive package library (7,000+ formulae)
- GUI app support via casks
- Easy updates and uninstalls
- Community-maintained and free
Cons
- macOS/Linux only (no Windows)
- Occasionally slow to update major versions
- Conflicts with system Python/Ruby possible
Final Verdict
Homebrew is the foundation of Mac development environments. If you develop on macOS and don't have Homebrew installed, run the install command now — it takes two minutes and saves hours of manual software management.