Homebrew

Homebrew is an pretty nice software packaging and distribution system, something that MacOS is sorely missing. Basic operation of Homebrew is fairly well documented and has a relatively simple interface. With that said, here are some tips to help you get moving should you wish to use the two to simplify your software management.

Homebrew

Installation

Just go to https://brew.sh and follow the instructions there.

The final line in the installation script will tell you to execute a command to have Homebrew configure itself when you start a new shell. Humbly we ask that you add this instead to the end of your ~/.zshrc or ~/.bashrc depending on your shell (echo $SHELL):

if [[ $(uname -p) == 'arm' ]]; then
   brew_bin="/opt/homebrew/bin/brew"
else
   brew_bin="/usr/local/bin/brew"
fi
[[ -f ${brew_bin} ]] && eval "$(${brew_bin} shellenv)"

This will assist you in selecting between your native Homebrew installation vs. a Rosetta-based Intel Homebrew install.

For Apple Silicon Users - An Alternative Intel Homebrew Setup

If you have an Apple computer with an M1, M2, or other Apple Silicon processor, due to the fact that we have some older projects which require older Ruby installations, you may find that performing an alternative installation of Homebrew under Rosetta 2 to be helpful.

First, you should open a shell with

arch -x86_64 /bin/zsh -l

After that, paste in the commands from https://brew.sh.

Basic Commands

brew doctor
  # Helps troubleshoot when homebrew is causing you fits.
brew update
  # Updates the definitions for all the packages.
brew upgrade [--all] [package name]
  # Upgrades either all packages or a particular package.
brew search [search pattern]
  # Returns a list of packages matching your search.
brew install [package name]
  # Installs a package
brew info [package name]
  # Gives important information about a package.
brew uninstall [package name]
  # Removes a package.
brew cleanup
  # Maintenance of your Homebrew system (good to run occasionally)

This is the meat of Homebrew. All the packages contained within Homebrew are typically command-line packages (there are exceptions). Many of them are pre-requisites for some of the Ruby gems we end up installing.

Homebrew-Cask

Homebrew-Cask is the lesser understood part of this equation. Homebrew-Cask is a native “tap” which interfaces with Homebrew to install GUI-based software that normally has its own installer.

You can get at all of the packages in Homebrew-Cask via the normal brew command, although some Casks may require you to throw the --cask option to get the Cask instead of the Homebrew formula.

brew install --cask [package name]

All installed taps get updated when Homebrew updates itself, so new “Casks” are available after updating Homebrew.

Updated: