The missing package manager for macOS.
# To search for available formulas and casks:
brew search <text>
# To install the latest stable version of a formula (use '--devel' for development versions):
brew install <formula>
# To list all installed formulae:
brew list
# To list installed formulae that are not dependencies of another installed formula:
brew leaves
# To upgrade an installed formula (if no formula name is given, all installed formulae are upgraded):
brew upgrade <formula>
# To fetch the newest version of Homebrew and of all formulae from GitHub:
brew update
# To remove old versions of installed formulae (if no formula name is given, all installed formulae are processed):
brew cleanup <formula>
# To display information about a formula (version, installation path, dependencies, etc.):
brew info <formula>
# To check the local Homebrew installation for potential problems:
brew doctor
# ---
# Incorrect permission issue
#
# - https://github.com/mxcl/homebrew/issues/13276
# - https://github.com/mxcl/homebrew/wiki/Troubleshooting
#
# What doctor said:
#
# Error: Some directories in /usr/local/share/locale aren't writable.
#
# This can happen if you "sudo make install" software that isn't managed
# by Homebrew. If a brew tries to add locale information to one of these
# directories, then the install will fail during the link step.
#
# You installing something via sudo or a pkg, and it took ownership of a
# bunch of share folders. You'll want to chown them back to your user.
#
# The following command should set the correct ownership and group for all files and directories
# below and including `/usr/local/share`
sudo chown -R $(whoami) /usr/local