Personal macOS / Linux shell + git + tool configuration. Targets macOS (Apple Silicon) as the primary daily driver, with light support for Linux (Codespaces, occasional VMs).
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/fletchto99/dotfiles/master/script/bootstrap)"The bootstrap is idempotent — safe to re-run on an already-configured machine. Existing real files (not symlinks) get backed up to ~/dotfiles_old/ on first link; subsequent runs detect the existing symlinks and skip the backup step to avoid clobbering the original backup. Most steps prompt interactively (Homebrew install, Brewfile sync, iTerm2/Alfred config, dotfile linking) so partial installs are easy.
| File | Purpose |
|---|---|
.zshrc, .exports, .aliases, .functions |
Shell config split by responsibility |
.gitconfig + .gitconfig_{macos,linux,windows} + .gitconfig_work |
Base git config + per-OS overrides (1Password SSH signing, credential helper, URL rewrites) wired in via a ~/.gitconfig.local symlink, plus a work-account override loaded by remote URL |
.gitignore_global, .inputrc |
Global git ignores + readline (REPL) configuration |
.ssh/config* |
Hostname aliases and routing (private keys are NOT versioned — see .gitignore) |
.copilot/copilot-instructions.md |
Per-user GitHub Copilot CLI preferences |
.iterm2/, .alfred/ |
iTerm2 + Alfred app preference files (loaded via app-specific "load from folder" settings) |
Brewfile |
Homebrew formulae + casks + taps, auto-generated via brew bundle dump |
script/bootstrap |
Idempotent installer |
zsh is the macOS default and bash-compatible enough that pasting bash snippets from docs / Stack Overflow / internal runbooks Just Works. oh-my-zsh's compinit overhead (~150ms warm) is acceptable for the convenience of its plugin/completion ecosystem.
Tradeoffs considered:
- fish — Better defaults out of the box but requires translating every bash idiom. Bad fit for systems-y work.
- starship / p10k — Power prompts. Skipped p10k specifically due to maintenance concerns; starship is fine but I don't need a richer prompt right now.
The .zshrc is aggressively tuned for fast warm startup (~150ms):
- Lazy-loaded
nvmandrbenv— neither runsinituntil you actually callnode/nvm/ruby/rbenv/gem/bundle/ etc. Function shims do the lazy init on first call and self-replace. - NODE_GLOBALS cached — the slow scan of
~/.nvm/versions/node/**/binruns once a week into~/.nvm-node-globals-cacherather than on every shell. $HOMEBREW_PREFIXcached —brew --prefixis ~50ms; cached to a variable instead of re-running.- Dropped the OMZ
gitplugin — its 30+ aliases (g,gst,gco, etc.) aren't in my muscle memory; the plugin's compdef calls were a measurable share of startup.gititself is unaffected. - Dropped
bash_completionsourcing — zsh has its own completion system; the bash framework was dead weight when sourced in zsh. - Disabled
compaudit,ENABLE_CORRECTION,DISABLE_MAGIC_FUNCTIONS— each saves a few ms and removes a class of paste-time surprises.
Both are cloned into ${ZSH_CUSTOM}/plugins/ by the bootstrap (idempotent — only clones if missing). Order matters: zsh-syntax-highlighting must load LAST in plugins=(...) because it hooks the command-line preexec.
code-insiders is core.editor and the git diff/merge tool across all platforms. Works on macOS / Linux / Windows / WSL — the only realistic gap is plain GitHub Codespaces (where only code is in PATH; one-line override there).
Commits sign via op-ssh-sign (1Password's SSH agent), not GPG. The same SSH key is used on every OS — only the path to op-ssh-sign and the credential helper differ. Per-OS settings live in three sibling files:
| File | 1Password path | Credential helper |
|---|---|---|
.gitconfig_macos |
/Applications/1Password.app/Contents/MacOS/op-ssh-sign |
osxkeychain |
.gitconfig_linux |
/opt/1Password/op-ssh-sign |
cache --timeout=3600 |
.gitconfig_windows |
C:/Users/<user>/AppData/Local/1Password/app/8/op-ssh-sign.exe |
manager (Git Credential Manager) |
Each file is self-contained — including the GitHub https:// → git@ URL rewrites — so swapping the active one is a single symlink change.
How it gets loaded. The committed .gitconfig has one unconditional line: [include] path = ~/.gitconfig.local. Git silently no-ops on a missing include, so the same .gitconfig works everywhere — including for repos cloned outside ~/, which the old [includeIf "gitdir:/Users/"] heuristic missed and broke commit signing in /tmp/ and similar.
- macOS:
script/bootstrapsymlinks~/.gitconfig.local→~/.dotfiles/.gitconfig_macosautomatically. - Linux: bootstrap symlinks
→ .gitconfig_linuxonly if/opt/1Password/op-ssh-signexists. On Codespaces / Linux boxes without 1Password, no symlink is created and commits stay unsigned (the desired behavior — signing would otherwise fail on every push). - Windows: bootstrap doesn't run on Windows (bash script, Homebrew/apt assumptions). Wire it up manually in Git Bash / WSL:
Or, from PowerShell:
ln -s ~/.dotfiles/.gitconfig_windows ~/.gitconfig.local
EditNew-Item -ItemType SymbolicLink -Path "$HOME\.gitconfig.local" -Target "$HOME\.dotfiles\.gitconfig_windows"
.gitconfig_windowsif your Windows username isn'tfletchto99—%LOCALAPPDATA%doesn't expand inside git config, so the path is hardcoded.
rerere.enabled = true— auto-replays previously-resolved conflicts during rebasesdiff.algorithm = histogram+colorMoved = zebra— readable diffs with distinct coloring for moved linesmerge.conflictStyle = zdiff3— shows common ancestor between conflict markersbranch.sort = -committerdate— most-recently-used branches first ingit branchcommit.verbose = true— diff shown in commit-message editorpush.followTags = true+tag.gpgsign = true— annotated tags push automatically and sign with the same SSH keycore.fsmonitor = true— FSEvents-backedgit status(5–10× faster on large repos)- URL rewriting:
https://github.com/→git@github.com:(always use SSH for github.com, plus defensive redirect for the deprecatedgit://protocol)
- Node:
nvm(droppednodenvto avoid two tools doing the same job) - Ruby:
rbenv - Python:
uvfor tool installs (uv tool install), system Homebrew Python for the interpreter
Generated via brew bundle dump --formula --cask --tap --no-vscode --describe. Includes transitive deps so a fresh-machine brew bundle reproduces the exact install state.
VS Code extensions are intentionally NOT tracked here — Settings Sync (signed in via GitHub) is the single source of truth for extensions, settings, keybindings, and snippets. Two managers fighting over one resource was worse than letting Settings Sync own it.
Only the user-managed copilot-instructions.md file is symlinked — not the whole ~/.copilot/ directory. The Copilot CLI writes machine-local state (session state, plugins, MCP configs) under that directory that should stay machine-local.
- Real files get backed up to
~/dotfiles_old/<relative-path>on first link, never re-backed-up on subsequent runs. - Special-case directories (
.ssh/,.copilot/) are linked per-file, not as whole-directory symlinks — preserves machine-local content (SSH private keys, Copilot runtime state) that shouldn't be versioned. ~/.dotfiles/script/bootstrapis the canonical install path. Editing dotfiles directly in~/.dotfiles/thengit pushis the canonical update path (changes are live immediately via the symlinks).