Taps (third-party repositories)

brew tap adds more repositories to the list of formulae that brew 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

$ brew tap

Repository naming conventions and assumptions

Formula duplicate names

If your tap contains a formula that is also present in homebrew/core, that’s fine, but it means that you must install it explicitly by default.

If you would like to prioritise a tap over homebrew/core, you can use brew tap-pin username/repo to pin the tap, and use brew tap-unpin username/repo to revert the pin.

Whenever a brew install foo command is issued, brew will find 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.

For example, you can create a tap for an alternative vim formula. Without pinning it, the behaviour will be:

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

However if you pin the tap with brew tap-pin username/repo, you will need to use homebrew/core to refer to the core formula.

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

Note that pinned taps are prioritized only when the formula name is directly given by you, i.e. it will not influence formulae automatically installed as dependencies.

Fork me on GitHub