2023 11 25 Homebrew Setup


I am attending AWS re: Invent 2023 next week and I need to set up my recently purchased 15" MacBook Air with all the applications I need for development and personal use. Instead of downloading the applications individually from either the App Store or the vendor’s website, I am consolidating all of my system configurations using Homebrew.

I won’t get into the specifics of installing applications and utilities using Homebrew in this post. Tutorials on the web will help you with that task. I will concentrate on using brew bundle to gather your existing configuration and use brew on a new machine to install the applications and utilities I use on a day-to-day basis.

Homebrew Background

I’ve used Homebrew to install the various command line utilities I use on my Macintosh. In addition, Homebrew supports graphical applications installed directly from the vendor’s website (like Google Chrome) and applications installed from the Macintosh App Store (known as MAS within Homebrew).

Clean Install

My standard procedure with a new Macintosh or with a new release of macOS is to do a clean install of the system from scratch. Although OS installation has gotten considerably better, experience with Linux, Windows, and macOS installations makes me install from scratch. The rise of cloud storage for applications allows for the easy transfer of data from machine to machine, while this process will allow for transfer of the standard applications from machine to machine.

Homebrew Bundle

The Homebrew bundle feature is the glue that ties everything together when installing the various applications and utilities. It supports command line installation as well as direct download installs and installs from MAS.

Bundle is installed when you first invoke brew bundle and if you run brew bundle dump it will generate a Brewfile in the current directory listing the installed products. The Brewfile is what you will configure and transfer to the new device to install applications.

Install Homebrew

First, we need to install Homebrew on the clean OS install. Homebrew requires the installation of the XCode command line developer tools. From a terminal prompt:

xcode-select --install

You can then install Homebrew through the standard command found on the Homebrew site:

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

You’ll be asked for your password to install Homebrew and create the necessary configuration.

Migration

You are now ready to install the applications and utilities in your Brewfile. I keep my file in a GitHub repository along with my standard zsh setup commands and other configurations.

Get the Brewfile to the new machine and then use the brew bundle command to start the installation. The only dependency at this point is Homebrew.

brew bundle