Install homebrew

To install homebrew, simply paste the following line into your favorite Mac terminal emulator:

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

To make sure everything is up to date, run:

brew update

To make sure everything is configured correctly, run the following command, addressing any warnings or errors before proceeding. Most of the warnings can be ignored, but for the smoothest install, it is better to address them sooner rather than later.

brew doctor

Additionally, add the following to your shell's 'rc' file to source homebrew programs ahead of the system's default versions:

export PATH=/usr/local/bin:$PATH

If you find you have already completed these instructions but are upgrading from OS X 10.8, 10.9, or 10.10, you will need to reinstall all homebrew packages or start from scratch. Luckily, there is an easy way to do the former:

brew list | xargs brew reinstall -v

This should reinstall all packages in their current versions.