Keeping Two Macs in Sync with yadm and Homebrew

How I keep my MacBook Neo field Mac and MacBook Pro shack Mac consistent: profiles, layered Brewfiles, a bootstrap script, and synced files.

Posted by Chris - K5CTW on Sunday, April 19, 2026

A few weeks ago I wrote about switching to a MacBook Neo as my field computer, while my M5 Pro MacBook Pro stays in the shack. Having two Macs brought a new problem: keeping them consistent.

The field Mac has to have the same apps, the same radio settings, and the same files as the shack Mac, or I’ll find out what’s missing at a picnic table with no internet. Here’s how I keep them in sync, with the tools I use, how I set it up, some tips, and ideas for taking it further.

The Tools

  • yadm (“Yet Another Dotfiles Manager”): keeps my configuration files (“dotfiles,” like ~/.zshrc) in a git repository. It works like git, but on files in your home folder, and adds per-machine profiles, a bootstrap script, and encryption for secrets.
  • Homebrew: the package manager for macOS. With Homebrew Bundle, a text file called a Brewfile lists every app, command-line tool, Mac App Store app, and VS Code extension a Mac should have.
  • Git repos: for code plugs (radio programming files) and manuals, so the files I need in the field are synced and versioned.

How I Did It

One Repo, Two Profiles

Everything lives in one private yadm repo that serves every Mac. Each Mac has a profile, made of yadm classes:

MacClassesWhat it adds
MacBook Pro (shack)m5Mac hamDevelopment tools and my full desktop setup, plus the ham radio tools
MacBook Neo (field)neo hamThe ham radio tools, plus SDR tools and a few field-specific apps

The profile is stored in each Mac’s local yadm config, not in the repo, so the same files can behave differently on each machine:

yadm config --get-all local.class      # show this Mac's profile
yadm config --add local.class neo      # add a class
yadm config --add local.class ham

Layered Brewfiles

Instead of one giant list, my apps are split into layers:

FileInstalled on
~/.config/homebrew/BrewfileEvery Mac: shell tools, git, yadm, browsers, iTerm2, VS Code
~/.config/homebrew/Brewfile.hamMacs with the ham class: hamlib, Direwolf, fldigi, flrig, GridTracker, TQSL, Arduino tools, Raspberry Pi Imager
~/.config/homebrew/Brewfile.m5MacThe shack Mac only
~/.config/homebrew/Brewfile.neoThe field Mac only: SDR tools (HackRF, Gqrx), Hugo, and a few others

The trick that makes this work is a few lines at the bottom of the shared Brewfile. A Brewfile is Ruby, so it can ask yadm for this Mac’s classes and load the matching layers:

# Per-class layers
`#{HOMEBREW_PREFIX}/bin/yadm config --get-all local.class 2>/dev/null`.split.each do |cls|
  layer = File.expand_path("~/.config/homebrew/Brewfile.#{cls}")
  instance_eval(File.read(layer), layer) if File.exist?(layer)
end

Then one line in ~/.zshenv tells Homebrew where the Brewfile lives:

export HOMEBREW_BUNDLE_FILE_GLOBAL="$HOME/.config/homebrew/Brewfile"

Now the same commands work on either Mac, and each one gets its own set of apps:

brew bundle install --global   # install anything missing for this Mac's profile
brew bundle check --global     # is anything missing?
brew bundle cleanup --global   # list installed apps that aren't in any Brewfile

Adding an app to both Macs is one line in the right Brewfile and a commit. The next brew bundle install --global on the other Mac picks it up.

Apps Homebrew Can’t Install

Some ham apps aren’t in Homebrew, or need a license. I keep those in a plain text file, manual-installs.txt, as class | app | where to get it:

ham  | WSJT-X                  | wsjt.sourceforge.io
ham  | CHIRP                   | chirpmyradio.com
ham  | Ham2K Portable Logger   | polo.ham2k.com
ham  | SDR++                   | sdrpp.org
ham  | Elecraft KX2 Utility    | elecraft.com

At the end of setup, the bootstrap prints the entries that match the Mac’s classes as a checklist, so nothing gets forgotten.

The Bootstrap Script

yadm runs a bootstrap script (~/.config/yadm/bootstrap) after cloning, and I can re-run it any time with yadm bootstrap. Every step skips work that’s already done. Mine:

  1. Installs the Xcode Command Line Tools and Homebrew if they’re missing.
  2. Asks for this Mac’s classes (neo ham or m5Mac ham) if none are set, then runs yadm alt.
  3. Installs everything with brew bundle, continuing past any single failure.
  4. Sets Homebrew’s zsh as the login shell.
  5. Points iTerm2 at its settings folder in the repo.
  6. Optionally applies my macOS settings (Finder, Dock, trackpad, screenshots) from a macos-defaults.sh script.
  7. Prints the manual-install checklist for this Mac’s profile.

Setting Up a New Mac

On a brand-new Mac, setup comes down to a few commands:

xcode-select --install
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
eval "$(/opt/homebrew/bin/brew shellenv)"
brew install yadm gh
gh auth login                                        # my repo is private
yadm clone https://github.com/<you>/<dotfiles>.git --bootstrap

Answer the class prompt, work through the checklist, and the Mac matches the others.

Secrets Stay Encrypted

Some files shouldn’t sit in a git repo in plain text. yadm’s encryption keeps them in an encrypted archive instead, using a list of patterns in ~/.config/yadm/encrypt. Mine covers SSH private keys, fldigi’s main config (it holds my QRZ and LoTW passwords), and my TQSL backup with my LoTW certificates. On a new Mac, yadm decrypt restores them with a passphrase.

Ham App Settings, Too

The same repo tracks settings for my ham apps: fldigi preferences and macros, flrig rig profiles, and CHIRP settings. When I tweak a macro on one Mac, it’s a commit away from the other.

Keeping Files in Sync

Configuration and apps are only half of it. The other half is files, and most of the files I need in the field live in two git repos. A git pull on either Mac brings it up to date, and every change has a history I can roll back.

Code Plugs

My code plug repo has a folder for each radio, holding that radio’s programming files: the files from the RT Systems programmers for my Yaesu, Icom, and Kenwood radios, plus files for my AnyTone and other HTs. Alongside them is a Masters folder with my channel lists, split into numbered CSV groups by function:

  • common channels and calling frequencies
  • local repeaters
  • SKYWARN
  • GMRS and MURS
  • fox hunting
  • WWV
  • road trip channels
  • DMR lists by region

There’s also a dated master spreadsheet that ties them together. This is the system from Mastering the Handheld and From Spreadsheet to Speaker, and keeping it in git means that when a code plug change goes wrong, I can see exactly what changed and roll back.

Manuals

My manuals repo holds the PDF manuals for my gear, organized by type: radios (base, handheld, and mobile), antennas, amps and tuners, and tools. When I’m in a park trying to remember a menu setting, the manual is already on the laptop, no internet needed.

Keeping the Field Mac Lean

The Neo has limited storage compared with the MacBook Pro, so I keep its focus on field apps and data. The neo profile only adds what I need away from the shack, and some things deliberately stay home. My main shack logging software isn’t on the Neo at all; in the field, I log with my PoLo install.

Tips

  • Don’t run brew bundle dump --global --force. It replaces your layered Brewfile with one flat list and breaks the per-class loading. Add apps by hand instead.
  • Use brew bundle cleanup --global to find apps you installed but never added to a Brewfile.
  • Adopt apps you installed by hand. If an app was installed before you added its cask, brew install --cask --adopt <cask> lets Homebrew take over the existing copy instead of reinstalling it.
  • Think twice before decrypting every key on a Mac that travels. On a field Mac, consider creating SSH keys just for that machine instead of copying all your private keys onto a laptop that rides in a backpack.
  • Only run yadm encrypt on a Mac that has every encrypted file. It rebuilds the whole archive from the current Mac, so running it on a Mac that’s missing files leaves them out.
  • Google Drive works too. If git isn’t your thing, a shared Google Drive is a simpler way to keep files in sync across Macs. You give up git’s version history, and you’ll want to mark field files as available offline so they’re there without internet.
  • Re-run the bootstrap whenever you like. Because every step checks before it acts, yadm bootstrap doubles as a “fix whatever drifted” command.

Ideas for Enhancements

A few things I’d like to add, or that you might try in your own setup:

  • Per-Mac config files with yadm alternates. yadm can link different versions of a file depending on the class, hostname, or OS, using a ## suffix like .zprofile##class.neo and .zprofile##default (yadm alternates). That would let the field Mac and shack Mac have different flrig or fldigi settings for different radios.
  • Templates for small differences. yadm’s ##template files can fill in a value per machine instead of keeping two copies of a file.
  • Git LFS for large manuals. My manuals repo is already over 300 MB of PDFs, and every version of every file stays in git’s history. Git LFS (Large File Storage) keeps the big files outside the main history, so clones stay fast.
  • A pre-trip check. A short script that runs brew bundle check --global, pulls the latest dotfiles, and confirms the code plug repos are up to date would make a nice “ready for the field” button.
  • Check scripts automatically. Running ShellCheck (a linter for shell scripts) on the bootstrap and helper scripts catches mistakes before they bite on a new Mac.

Your Turn

You don’t need all of this on day one. This week, create a yadm repo with one dotfile and a Brewfile with the apps you use most. The next time you set up a Mac, or need your field computer to match your shack, you’ll be glad it’s there.

Do you keep more than one computer in sync for ham radio? Tell me in the comments how you do it.

73,

Chris - K5CTW
The Ham Radio Lab