From Fresh Mac to Dev-Ready in Minutes

Samir Saqer / November 23, 2024

AutomationmacOSHomebrew

I picked up a new MacBook last month, and for the first time ever, I didn't spend my entire weekend babysitting installer bars.

Look, My job is shipping code, not playing System Preferences whack-a-mole. After setting up my third Mac in two years, I'd had enough. So I automated the whole thing.

Now my setup takes about 30 minutes of active work, and most of that is just waiting for downloads. Here's how.

This is my personal setup. Your mileage may vary, and that's totally fine. Take what works, ignore the rest.

Start with Homebrew

First things first: get Homebrew installed. Think of it as the App Store for developers, except it actually works the way you want it to.

Open Terminal (hit Command + Space, type "Terminal") and paste this:

Bash
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Grab the latest command from brew.sh just to be safe, but that should work.

Dotfiles: Your Secret Weapon

Dotfiles are just config files that start with a dot. .zshrc for your shell, .gitconfig for Git, that kind of thing. The magic happens when you version control them.

Here's what changed the game for me: I keep all my dotfiles in a GitHub repo. New machine? Pull them down. Done.

My Setup

I keep it dead simple:

  • Shell config (.zshrc)
  • Terminal settings (using Warp these days—it's grown on me)
  • A Brewfile listing every app and CLI tool I use

The trick? Turn your home directory into a Git repo, but use .gitignore to only track what matters. Everything else stays local.

Getting SSH Sorted First

Before you can pull your dotfiles, you'll need SSH access to GitHub. Trust me, it's worth the five minutes now versus typing passwords forever.

GitHub's docs are actually pretty good for this:

  1. Generate an SSH key
  2. Add it to GitHub

Takes maybe five minutes. Do it once, forget about it forever.

Pulling Down Your Dotfiles

Since your home directory already exists, you can't just git clone like normal. Here's the workaround:

Bash
cd ~
git init
git remote add origin git@github.com:yourusername/dotfiles.git
git fetch
git checkout -f main

Boom. All your configs are exactly where they need to be.

The Brewfile: Where the Magic Happens

This is honestly my favorite part. A Brewfile is just a list of everything you want installed. That's it.

Here's a snippet from mine:

Ruby
# GUI Apps - Core Development
cask "visual-studio-code"      
cask "cursor"                   
cask "warp"                     
cask "docker"                   

# Browsers
cask "arc"                      
cask "firefox"                  

# Productivity & Communication  
cask "raycast"                  
cask "linear-linear"            
cask "slack"                    
cask "notion"                   

# Security & Passwords
cask "1password"                


# Command Line Tools
brew "git"                      
brew "gh"                       
brew "node"                     
brew "python"                   
brew "go"                       
brew "ripgrep"                  
brew "bat"                      
brew "eza"                      
brew "zoxide"                   
brew "fd"                       

# System Monitoring & Performance
brew "htop"                     
brew "btop"                     
brew "tldr"                     

# Development Tools
brew "jq"                       # JSON processor
brew "yq"                       # YAML processor
brew "httpie"                   # Better curl
brew "lazygit"                  # Terminal UI for git
brew "gh-copilot"               

# Database Tools
brew "postgresql@16"            
brew "redis"                    

# brew "temporal"               
# brew "dagger"                 
# brew "devbox"                 
# cask "windsurf"               

Then you just run:

Bash
brew bundle

Homebrew finds ~/Brewfile, installs everything on the list, and tells you if anything breaks. It's genuinely satisfying to watch.

The Couple Things Homebrew Can't Do

Some tools insist on their own installers. Whatever, I respect it.

nvm (Node Version Manager)

If you touch JavaScript at all, you need this. Projects demand different Node versions, and switching between them manually is hell.

Bash
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash

Check the nvm repo for whatever version is current when you read this.

Oh My Zsh

Makes your terminal actually pleasant. I mainly use it for Git aliases and the occasional theme when I'm feeling fancy.

Bash
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

The Last Mile

Even with all this automation, there's still some manual stuff:

  • Sign into all your accounts (1Password speeds this up considerably)
  • Tweak system preferences to your liking

My must-change settings:

  • Show battery percentage in the menu bar
  • Max out key repeat speed and minimize repeat delay
  • Enable tap to click (how is this not default?)
  • Rearrange dock, remove apps I'll never use

The Payoff

Total time from unboxing to actually working? Maybe an hour, and most of that is passive. Compare that to the full-weekend affairs I used to endure.

The best part? I'll never have to think about this again. Next time I need to set up a Mac, I'll just run through this same process. No guessing what I forgot to install. No digging through old blog posts to remember how I had things configured.

Just pull, run, done.