brew(1) – The missing package manager for macOS


brew --version
brew command [--verbose|-v] [options] [formula] …


Homebrew is the easiest and most flexible way to install the UNIX tools Apple didn’t include with macOS.


For the full command list, see the COMMANDS section.

With --verbose or -v, many commands print extra debugging information. Note that these flags should only appear after a command.



audit [options] formulae

Check formulae for Homebrew coding style violations. This should be run before submitting a new formula. Will exit with a non-zero status if any errors are found, which can be useful for implementing pre-commit hooks. If no formulae are provided, all of them are checked.

bottle [options] formulae

Generate a bottle (binary package) from a formula that was installed with --build-bottle. If the formula specifies a rebuild version, it will be incremented in the generated DSL. Passing --keep-old will attempt to keep it at its original value, while --no-rebuild will remove it.

bump-formula-pr [options] [formula]

Create a pull request to update a formula with a new URL or a new tag.

If a URL is specified, the SHA-256 checksum of the new download should also be specified. A best effort to determine the SHA-256 and formula name will be made if either or both values are not supplied by the user.

If a tag is specified, the Git commit revision corresponding to that tag must also be specified.

Note: this command cannot be used to transition a formula from a URL-and-SHA-256 style specification into a tag-and-revision style specification, nor vice versa. It must use whichever style specification the preexisting formula already uses.

create [options] URL

Generate a formula for the downloadable file at URL and open it in the editor. Homebrew will attempt to automatically derive the formula name and version, but if it fails, you’ll have to make your own template. The wget formula serves as a simple example. For the complete API, see:

edit [formulae]

Open a formula in the editor set by EDITOR or HOMEBREW_EDITOR, or open the Homebrew repository for editing if no formula is provided.

extract [options] formula tap

Look through repository history to find the most recent version of formula and create a copy in tap/Formula/formula@version.rb. If the tap is not installed yet, attempt to install/clone the tap before continuing.

formula formulae

Display the path where a formula is located.

irb [options]

Enter the interactive Homebrew Ruby shell.

linkage [options] [formulae]

Check the library links for kegs of installed formulae. Raises an error if run on uninstalled formulae.

man [options]

Generate Homebrew’s manpages.

mirror formulae

Reuploads the stable URL for a formula to Bintray to use it as a mirror.

prof [ruby options]

Run Homebrew with the Ruby profiler.

Example: brew prof readall

pull [options] patch sources

Get a patch from a GitHub commit or pull request and apply it to Homebrew. Optionally, publish updated bottles for the formulae changed by the patch.

Each patch source may be one of:

~ The ID number of a PR (pull request) in the homebrew/core GitHub repository

~ The URL of a PR on GitHub, using either the web page or API URL formats. In this form, the PR may be on Homebrew/brew, Homebrew/homebrew-core or any tap.

~ The URL of a commit on GitHub

~ A “…” string specifying a testing job ID

release-notes [options] [previous_tag] [end_ref]

Print the merged pull requests on Homebrew/brew between two Git refs. If no previous_tag is provided it defaults to the latest tag. If no end_ref is provided it defaults to origin/master.

ruby [ruby options]

Run a Ruby instance with Homebrew’s libraries loaded.

Example: brew ruby -e "puts :gcc.f.deps" or brew ruby script.rb

tap-new user/repo

Generate the template files for a new tap.

test [options] formulae

Run the test method provided by an installed formula. There is no standard output or return code, but generally it should notify the user if something is wrong with the installed formula.

Example: brew install jruby && brew test jruby

tests [options]

Run Homebrew’s unit and integration tests.

update-test [options]

Run a test of brew update with a new repository clone. If no arguments are passed, use origin/master as the start commit.


These options are applicable across all sub-commands.



Homebrew, like git(1), supports external commands. These are executable scripts that reside somewhere in the PATH, named brew-cmdname or brew-cmdname.rb, which can be invoked like brew cmdname. This allows you to create your own commands without modifying Homebrew’s internals.

Instructions for creating your own commands can be found in the docs:


Many Homebrew commands accept one or more formula arguments. These arguments can take several different forms:


Note that environment variables must have a value set to be detected. For example, export HOMEBREW_NO_INSECURE_REDIRECT=1 rather than just export HOMEBREW_NO_INSECURE_REDIRECT.


Use the http_proxy, https_proxy, all_proxy, no_proxy and/or ftp_proxy documented above.

For example, for an unauthenticated HTTP or SOCKS5 proxy:

export http_proxy=http://$HOST:$PORT

export all_proxy=socks5://$HOST:$PORT

And for an authenticated HTTP proxy:

export http_proxy=http://$USER:$PASSWORD@$HOST:$PORT


Homebrew Documentation:

brew-cask(1), git(1), git-log(1)


Homebrew’s lead maintainer is Mike McQuaid.

Homebrew’s project leadership committee is Mike McQuaid, JCount, Misty De Meo and Markus Reiter.

Homebrew/brew’s other current maintainers are Claudia, Michka Popoff, Shaun Jackman, Chongyu Zhu, commitay, Vitor Galvao, JCount, Misty De Meo, Gautham Goli, Markus Reiter, Steven Peters, Jonathan Chang and William Woodruff.

Homebrew/brew’s Linux support (and Linuxbrew) maintainers are Michka Popoff and Shaun Jackman.

Homebrew/homebrew-core’s other current maintainers are Claudia, Michka Popoff, Shaun Jackman, Chongyu Zhu, commitay, Izaak Beekman, Sean Molenaar, Jan Viljanen, Viktor Szakats, FX Coudert, Thierry Moisan, Steven Peters, JCount, Misty De Meo and Tom Schoonjans.

Former maintainers with significant contributions include Dominyk Tiller, Tim Smith, Baptiste Fontaine, Xu Cheng, Martin Afanasjew, Brett Koonce, Charlie Sharpsteen, Jack Nagel, Adam Vandenberg, Andrew Janke, Alex Dunn, neutric, Tomasz Pajor, Uladzislau Shablinski, Alyssa Ross, ilovezfs and Homebrew’s creator: Max Howell.


See our issues on GitHub:

Fork me on GitHub