Reputation: 11068
Sometimes I see articles saying command of brew tap
before brew install
something. I am wondering what does tap
mean? And why must I run tap
before install
?
Upvotes: 431
Views: 148200
Reputation: 2544
package
≡ formula
≡ ruby file
: this typically deals with command line (CLI) softwarebottle
: binary program already built for some OS (macOS montery, macOS big_sur, arm64_monterey, arm64_big_sur, catalina, x86_64_linux) (configurations and make
is already done)casks
: GUI program or font; this is an extension of homebrew that allows us to install MacOS native applications like: Google Chrome (brew cask install google-chrome
), iTerm (" " iterm2
), Visual Studio Code (" " visual-studio-code
), etc. As well as install fonts: Roboto[ Mono] (" " font-roboto
/" " font-roboto-mono
), Latin Modern (" " font-latin-modern
), etc.taps
: [Github|Gitlab|...] repositories containing additional [formulas for downloading] packages that are not standard, i.e not incorporated into the official homebrew repository containing all [formulas for downloadable] packages.
"taps" allow you to extend the list of packages that you can install via homebrew. by "tapping" a repository you download (literally
git clone
) the repository locally. the repository wil contain ruby files (formulas) that tell homebrew how to download, configure, build, install, etc, an additional list of packages. Then when you dobrew install X
,brew
will scan through the official/standard homebrew repositories that you have locally, won't find a formula forX
, then it will scan through your "taps" and if it finds a formula forX
, will run it (the formula is aruby
file). Tap is like ppa on Ubuntu, aur on Arch, overlay on Gentoo
/usr/local/Cellar/<package>
with symlinks into /usr/local/bin
and /usr/local/lib
, etc./usr/local/Homebrew/Library/taps/homebrew/homebrew-core/formula
You can find any package at: https://formulae.brew.sh/
Upvotes: 63
Reputation: 86097
The tap command allows Homebrew to tap into another repository of formulae. Once you've done this you've expanded your options of installable software.
These additional Git repos (inside /usr/local/Homebrew/Library/Taps
) describe sets of package formulae that are available for installation.
E.g.
brew tap # list tapped repositories
brew tap <tapname> # add tap
brew untap <tapname> # remove a tap
Upvotes: 420
Reputation: 4961
brew tap
adds more repos to the list of formulae that brew tracks, updates, and installs from
brew tap <user>/<repo>
makes a shallow clone of the repository at https://github.com/user/homebrew-repo. Note that brew tap
prefixes the repo name with "homebrew-". After that, brew will be able to work on those formulae as if they were in Homebrew's canonical repository
The full documentation can be found here with all the available options.
Upvotes: 59