Taps (Third-Party Repositories)

The brew tap command adds more repositories to the list of formulae that Homebrew tracks, updates, and installs from. By default, tap assumes that the repositories come from GitHub, but the command isn’t limited to any one location.

The brew tap command

Repository naming conventions and assumptions

On GitHub, your repository must be named homebrew-something to use the one-argument form of brew tap. The prefix “homebrew-“ is not optional. (The two-argument form doesn’t have this limitation, but it forces you to give the full URL explicitly.)

When you use brew tap on the command line, however, you can leave out the “homebrew-“ prefix in commands. That is, brew tap username/foobar can be used as a shortcut for the long version: brew tap username/homebrew-foobar. brew will automatically add back the “homebrew-“ prefix whenever it’s necessary.

Formula with duplicate names

If your tap contains a formula that is also present in homebrew/core, that’s fine, but you would need to specify its fully qualified name in the form <user>/<repo>/<formula> to install your version.

Whenever a brew install foo command is issued, brew selects which formula to use by searching in the following order:

If you need a formula to be installed from a particular tap, you can use fully qualified names to refer to them.

If you were to create a tap for an alternative vim formula, the behaviour would be:

brew install vim                     # installs from homebrew/core
brew install username/repo/vim       # installs from your custom repository

As a result, we recommend you give new names to customized formulae if you want to make them easier to install. Note that there is (intentionally) no way of replacing dependencies of core formulae with those from other taps.

Fork me on GitHub