Over time, I've installed a number of packages with Homebrew, mostly from the default repo of formulae (homebrew-core), but some from other locations via brew tap
.
Now I'm putting together some install scripts to make my dev environment more reproducible, and I'm trying to figure out which packages can be installed by a simple brew install
and which require a brew tap
beforehand.
The ability to query brew has proved useful for figuring out which options I used for each package, but not for this tap-related question. Is there a way to do this without manually going through each package and seeing where it's available?
The brew tap command brew tap <user/repo> makes a clone of the repository at https://github.com/<user>/homebrew-<repo> into $(brew --repository)/Library/Taps . After that, brew will be able to work with those formulae as if they were in Homebrew's homebrew/core canonical repository.
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.
By default, Homebrew will install all packages in the directory /usr/local/Cellar/ , and also creates symbolic links at /usr/local/opt/ and /usr/local/bin/ (for executable files).
brew cask is an extension to brew that allows management of graphical GUI applications. Homebrew Cask extends Homebrew and brings its elegance, simplicity, and speed to OS X applications and large binaries alike. Cask deals with a mixture of software and licences.
I found a couple ways that work.
brew list --full-name
Slower, but a little more informative:
brew info $(brew list) | grep '^From:' | sort
This expression would return a list of installed 3rd party packages only:
brew list --full-name -1 | grep /
…for the respective list of taps in use, try:
brew list --full-name -1 | grep / | cut -d"/" -f1 -f2 | sort | uniq
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With