macOS dotfiles managed with chezmoi.
Bootstrap a new Mac
On a fresh macOS install, run:
sh -c "$(curl -fsLS get.chezmoi.io)" -- init --apply <github-username>
This single command will:
- Install chezmoi
- Clone this repo
- Install Xcode Command Line Tools
- Install Homebrew
- Install all packages from the Brewfile (formulae, casks, App Store apps)
- Apply dotfiles (
~/.zshrc,~/.aerospace.toml) - Install global runtimes via mise (python, bun)
What's included
Shell (dot_zshrc → ~/.zshrc)
- mise — runtime version manager (python, node, bun)
- starship — cross-shell prompt
- fzf — fuzzy finder with shell keybindings
- zoxide — smart
cdwith frecency - eza — modern
lswith icons and git status - ripgrep — fast recursive search (
grepis aliased torg) - Git helpers (
gc,gcp,glola, etc.) awt— creates git worktree sandboxes for AI coding agents- TypeID/UUID conversion helpers
Window management (dot_aerospace.toml → ~/.aerospace.toml)
- AeroSpace — i3-like tiling window manager for macOS
- JankyBorders — active/inactive window border highlights (launched by AeroSpace on startup)
Apps can be excluded from tiling by adding [[on-window-detected]] blocks to ~/.aerospace.toml. To find an app's bundle ID:
osascript -e 'id of app "App Name"'Brewfile
All Homebrew formulae, casks, and Mac App Store apps. See inline comments in Brewfile for what each package does.
Secrets
Machine-local secrets go in ~/.secrets (sourced by .zshrc, not tracked by git):
# ~/.secrets export GITHUB_TOKEN="ghp_..." export POSTICO_LICENSE_KEY="..."
Structure
~/.local/share/chezmoi/
├── .chezmoiignore # Files to keep in repo but not apply to ~
├── .gitignore # Files excluded from git
├── AGENTS.md # Instructions for AI coding agents
├── README.md # This file
├── Brewfile # Homebrew packages (included in install script)
├── dot_aerospace.toml # → ~/.aerospace.toml
├── dot_zshrc # → ~/.zshrc
├── run_once_before_install-packages.sh.tmpl # Xcode CLT + Homebrew + brew bundle
└── run_once_after_setup-mise.sh.tmpl # mise runtimes + Postico license + next steps
Day-to-day usage
# Edit a managed dotfile chezmoi edit ~/.zshrc # Apply changes chezmoi apply # Pull and apply on another machine chezmoi update # Add a new dotfile chezmoi add ~/.config/starship.toml # See what would change chezmoi diff
Re-running bootstrap scripts
The run_once scripts only execute once per machine. To force a re-run:
chezmoi state delete-bucket --bucket=scriptState chezmoi apply