Homebrew – “the missing package manager for OS X”

I made a pretty neat discovery recently. There’s this package manager for Mac OS X called Homebrew that allows you to install Unix packages from the command line, using the brew command. It’s patched together from Ruby scripts and shell scripts and uses git as a backend. You can install it on Mac OS X using the following command:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

This is much better than using apt-get in Mac OS X (now no longer an option), where it would barf because I didn’t have the XCode command line tools, but it would provide no indication of how to get said tools. That script installs the XCode tools automatically if they’re not there. It’s also better than manually compiling code from source, which can be a major pain the ass, especially when you run into dependency issues (which is more often than not the case).

Homebrew is very similar to apt-get in its command structure. For example, here is how you install a package:

brew install lynx

There are several other Homebrew commands worth remembering. For example:

brew edit lynx

This opens the source code for the installer script for the package in the default text editor.


  • remove – uninstalls a package
  • list – lists installed packages
  • search – lists currently available packages
  • update – updates a package

All of these have the same command structure: brew <command> <package>.

I’ve installed several packages so far. I will list them here:

  • Lynx – the text-mode browser
  • Snownews – an RSS feed aggregator for the CLI
  • Bitchx – a text-based IRC client
  • NASM – an x86 assembler
  • wget – allows you to download files from the command line
  • CLISP – Command Lisp compiler, interpreter, and REPL

This is an exciting discovery. Now I can use all my favorite Linux software in Mac OS X!