The most basic command
brew bundle install
Looks for ~/Brewfile and installs its contents
My current minimal Brew on macOS is:
tap "homebrew/core"
tap "homebrew/bundle"
tap "homebrew/cask"
tap "buo/cask-upgrade"
brew "github-keygen"
brew "gnupg"
brew "pinentry-mac"
brew "stow"
brew "mas"
brew "gh"
cask "carbon-copy-cloner"cask "atom"
cask "typora"
If you want to use a brewfile from a non-standard place.
brew bundle --file=~/.private/Brewfile
Or more specifically:
brew bundle install --file=rs-brew-dump
You can dump a Brewfile of your current brew/cask/mas entries into your current directory with
brew bundle dump
or to a specific directory and file name.
brew bundle dump --file=~/.private/Brewfile
If a Brewfile already exists, you'll need to do
brew bundle dump --force
If you want your current system configuration to match your brewfile
brew bundle --force cleanup
A key practice is to install EVERYTHING possible using brew, brew cask, or mas. Even things like fonts!
I have two brewfiles currently:
-
One in
~.privatewhich I install right after installing brew and before setting up my basic.sshand.gnupgfiles so that I can use GitHub. It is the minimal essential list above. I can install this manually with a script inside.private. -
My standard in
~/Brewfileis actually a symlink to~/.dotfiles/mac/Brewfile. I different~/.dotfiles/for different environments.- My primary Mac is a monster MacBook Pro is really more of a "desktop" for me. It has 64 GB RAM with an 8TB HD. It probably has my largest Brewfile.
- That being said, it actually doesn't have many development tools in it. Instead, I mostly use VMware instances (mostly macOS but some Debian) for my development images. They use a different
~.dotfilesbased Brewfile. - My smaller, older MacBook is mostly for travel. It has different set of
~/.dotfiles/focused on just enough to work remotely. I'm always prepared to restore this Mac from scratch. - For a month or so each year, late summer early fall, my old MacBook also will run the latest beta of macOS, allowing me to test not just macOS, but also be prepared for changes to my development environments.
TODO:
brew bundle dump --file=~/brew_bundle_titania_2022-09-18.txt