Dotfiles Management
Commands
- •
/dotfiles- Show status and help - •
/dotfiles sync- Sync dotfiles (auto-detects first-time vs update) - •
/dotfiles health- Run diagnostics - •
/dotfiles setup- Interactive first-time setup guide - •
/dotfiles add <app>- Add new config
How the System Works
Symlink-based: ~/.dotfiles/symlink_map.txt defines source → destination mappings.
code
shared/git/.gitconfig:$HOME/.gitconfig shared/nvim/.config/nvim:$HOME/.config/nvim shared/iterm2/dotfiles-profile.json:$HOME/Library/Application Support/iTerm2/DynamicProfiles/dotfiles-profile.json
Scripts:
- •
sync.sh- Main command: apply dotfiles state (auto-detects first-time vs update) - •
health.sh- Pure diagnostics,--fixto auto-repair - •
cleanup.sh- Aggressive cleanup or show opportunities (conservative) - •
uninstall.sh- Clean removal
Multi-mode: ~/.dotfiles/.machine contains aggressive or conservative
- •
shared/configs apply in all modes - •
aggressive/Brewfileonly in aggressive mode (personal machines, repo is source of truth) - •Conservative mode: minimal changes, just shows cleanup opportunities (work machines)
To Show Status (/dotfiles)
- •Read
~/.dotfiles/.machinefor machine type - •Check key symlinks exist (from symlink_map.txt)
- •Show available commands
To Add New Config (/dotfiles add <app>)
- •Create directory:
~/.dotfiles/shared/<app>/ - •Add config files mirroring target structure
- •Add entry to
symlink_map.txt:shared/<app>/config:$HOME/.config/<app>/config - •Run
./sync.sh --links-only
First-Time Setup (/dotfiles setup)
Run ~/.dotfiles/health.sh --setup for interactive walkthrough:
- •Shell reload
- •Neovim plugin installation
- •iTerm2 profile selection
- •Claude Code authentication
- •Git identity setup
Troubleshooting
- •Git operations fail: Check GitHub SSH with
ssh -T git@github.com(must be set up before bootstrap) - •Symlink conflicts:
./sync.sh --dry-runshows state - •Broken links:
./health.sh --fixrepairs them - •Changes not applied: Run
./sync.sh --links-only - •First-time issues: Run
./health.sh --setupfor guided help