Is there a way to get a list of all formulas (packages) I can install using homebrew for Mac OS X?



You can visit formulae.brew.sh.

From your Mac

If you just want the package names for all formulae:

brew search

The following command will list the info snippets for all existing Homebrew formulae:

brew info --all

Or browse the local Git repository—thanks to Mk12 for that:

find /usr/local/Homebrew/ -type d -name "Formula" -exec ls -1 {} \;
  • 1
    Or for a third option, ls $(brew --prefix)/Library/Formula – mk12 Aug 19 '12 at 21:19
  • 2
    brew server is unsupported and will be removed soon. You should use braumeister.org instead. – Michael Dorst Aug 17 '14 at 8:02
  • brew server seems to have been removed now (accurate as of Homebrew 0.9.5 (git revision 5745; last commit 2016-01-04)) – stkent Jan 28 '16 at 16:53
  • github.com/mxcl/homebrew/tree/master/Library/Formula this no longer works. Gives a 404 – cavalcade Sep 9 '16 at 2:14
  • 1
    @MattTagg Thanks, I fixed the link. They split up the formulas into different repos now. – slhck Sep 9 '16 at 7:20

Apart from the things slhck mentioned, there's an online package browser available at braumeister.org

  • I was able to find the version needed. thank you – Krishna Vedula Dec 16 '15 at 12:38

You can also have a look at the Homebrew formulas index website (which is my project). The aim of this website is to provide an easy way to search for a Homebrew formula.

  • So I found brewformulas but can't seem to locate the formula for Mess, for example. Is there something I need to do to integrate homebrew and brewformulas? – David Hoelzer Jun 9 '15 at 23:00

Technically, the answer provided by @pengii23 above is correct, but as we know, JSON isn't very easy to understand. Moreover, that results in over 266,000 lines of output for 4546 packages, or more than 56 lines per package.

What we really want is just the package name, and the package description. The format might be something like this:

package -- description goes here
pack2 -- other description goes here

Now, if you have done a brew install gron, then I have a doozy of a command-line for you that will generate the type of output above:

$ brew info --json=v1 --all | gron | egrep '(.desc|.full_name) =' | \
grep -v 'runtime_dependencies' | sed 's/full_name/_name/' | \
gron -u | egrep -v '({|}|\[|\])' | \
sed -e 's/^.*"_name": //' -e 's/^.*"desc": //' | tr -d '\n' | \
sed -e 's/""/^I/g' -e 's/","/ -- /g'| tr '\t' '\n' | tr -d '"'

Note that you have to replace the literal "^I" in the line above with an actual tab character. For some reason, my sed is not liking '\t' instead of a literal tab character, and of course cutting-n-pasting a real tab character isn't going to work here.

Anyway, here's the first few lines of output from the command above:

a2ps -- Any-to-PostScript filter
a52dec -- Library for decoding ATSC A/52 streams (AKA 'AC-3')
aacgain -- AAC-supporting version of mp3gain
aalib -- Portable ASCII art graphics library
aamath -- Renders mathematical expressions as ASCII art
aap -- Make-like tool to download, build, and install software
aardvark_shell_utils -- Utilities to aid shell scripts or command-line users
abcde -- Better CD Encoder
abcl -- Armed Bear Common Lisp: a full implementation of Common Lisp
abcm2ps -- ABC music notation software

And here's the last few lines of output from the command above:

zssh -- Interactive file transfers over SSH
zstd -- Zstandard is a real-time compression algorithm
zsxd -- Zelda Mystery of Solarus XD
zsync -- File transfer program
zurl -- HTTP and WebSocket client worker with ZeroMQ interface
zxcc -- CP/M 2/3 emulator for cross-compiling and CP/M tools under UNIX
zxing-cpp -- C++ port of the ZXing barcode decoder
zyre -- Local Area Clustering for Peer-to-Peer Applications
zzuf -- Transparent application input fuzzer
zzz -- Command-line tool to put Macs to sleep

There you go! If you redirect that output to a file, you can then quickly grep the file for whatever kind of description you're looking for.

For example, if you're looking for compression commands, doing a brew search compress isn't very useful:

$ brew search compress
==> Searching local taps...
htmlcompressor            ncompress            yuicompressor
==> Searching taps on GitHub...
==> Searching blacklisted, migrated and deleted formulae...

But if we saved the output from the command above into a file in /tmp/brew.txt, then a simple grep compress /tmp/brew.txt returns 60 hits! Let's take a look at the first few:

$ grep -i compress /tmp/brew.txt | head
advancecomp -- Recompression utilities for .PNG, .MNG, .ZIP, and .GZ files
afsctool -- Utility for manipulating HFS+ compressed files
aften -- Audio encoder which generates ATSC A/52 compressed audio streams
archivemail -- Tool for archiving and compressing old email in mailboxes
brotli -- Generic-purpose lossless compression algorithm by Google
bzip2 -- Freely available high-quality data compressor
draco -- 3D geometric mesh and point cloud compression library
ecm -- Prepare CD image files so they compress better
epsilon -- Powerful wavelet image compressor
exomizer -- 6502 compressor with CBM PET 4032 support

So, if you were looking for advanced compression programs like brotli or zstd, but you didn't know the exact names to look for, then brew search compress would not be useful for you, but grepping through the output of the above command would return those two plus 58 more hits!

You're welcome! ;)

[ EDIT: Whoops! Sorry, I had forgotten to remove the runtime_dependencies from the previous version of the script. Sigh.... ]


grep desc $(brew --prefix)/Library/Formula/*.rb | perl -ne 'm{^.*/(.*?)\.rb.*?\"(.*)"$} and print "$1\t$2\n"'

  • 3
    Welcome to Super User! While this may answer the question, it would be a better answer if you could provide some explanation why it does so. – DavidPostill Jul 29 '15 at 20:20

As of 27 May, 2016, just

brew info --all

is not sufficient for listing all formula. You must additionally add the --json=v1 switch (currently, only v1 is supported, which you can see when you type brew info --help):

brew info --json=v1 --all

You can list Homebrew formulae using the command

brew search

or browse on the Web using http://formulae.brew.sh/ (or http://braumeister.org/ – it seems to be the same page).

However, there are additional packages that can be installed using a Homebrew extension called Cask. It can download and install prebuilt binary applications like GIMP, LibreOffice or even non-FOSS applications like TeamViewer. Casks can be listed using

brew cask search

and searched on https://caskroom.github.io/search.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.