brew
Install, update, and manage software packages
TLDR
Install the latest stable version of a formula or cask (use --devel for development versions)
List all installed formulae and casks
Upgrade an installed formula or cask (if none is given, all installed formulae/casks are upgraded)
Fetch the newest version of Homebrew and of all formulae and casks from the Homebrew source repository
Show formulae and casks that have a more recent version available
Search for available formulae (i.e. packages) and casks (i.e. native macOS .app packages)
Display information about a formula or a cask (version, installation path, dependencies, etc.)
Check the local Homebrew installation for potential problems
SYNOPSIS
brew command [options] [formula]
PARAMETERS
install formula
Installs the specified formula.
uninstall formula
Uninstalls the specified formula.
update
Updates Homebrew's package index.
upgrade
Upgrades outdated packages.
list
Lists installed packages.
search text
Searches for packages matching text.
info formula
Displays information about a formula.
doctor
Checks for potential problems with your Homebrew setup.
--version
Displays the version of Homebrew.
DESCRIPTION
brew is a package manager for macOS (and Linux) that simplifies the installation of software. It is often referred to as 'the missing package manager for macOS' because macOS doesn't include a system-level package manager by default like many Linux distributions do.
Instead of installing software manually by downloading and dragging application bundles, or building software from source, brew allows users to install packages from the command line with simple commands. It manages dependencies, compiles code (if necessary), and configures the software for optimal performance on the target system.
Brew works by installing packages into its own directory and then symlinking files into /usr/local. This prevents conflicts with system files and other installed software. It supports a wide variety of software packages including command-line tools, graphical applications, programming languages, and libraries. Brew also allows for managing and updating packages, ensuring that software remains up-to-date. Its flexible and easy to use package manager for both technical and non-technical users to install, update and uninstall software.
CAVEATS
Homebrew installs packages into its own directory (/usr/local by default) and then creates symlinks in /usr/local/bin and other directories. This means that you may need to adjust your PATH environment variable to include /usr/local/bin in order to use the installed software.
Some formulae may require additional configuration steps after installation. The output of the `brew install` command will often provide instructions for these steps.
TAPS
Homebrew uses "taps" to extend its available packages. A tap is a git repository that contains formulae. The default tap is homebrew/core, but users can add other taps to access additional software.
FORMULAE VS. CASKS
Homebrew differentiates between formulae and casks. Formulae describe command-line tools and libraries, while casks describe graphical applications and other software bundles.
HISTORY
Homebrew was created by Max Howell in 2009. The initial motivation was to provide a more user-friendly package manager for macOS than existing alternatives like MacPorts. It gained popularity for its ease of use, focus on binary packages (reducing compile times), and tight integration with the macOS environment. Over the years, Homebrew has evolved from a personal project into a widely adopted standard for managing software on macOS. It has expanded to support Linux and Windows (via WSL).