macOS dotfiles for work, personal, and agent machines. Manages shell config, Git config, and Homebrew packages via profiles.
dotfiles/
├── install.sh # Bootstrap script — run this on a new machine
├── .secrets.example # Template for ~/.secrets (API keys, tokens)
├── profiles/
│ ├── personal/Brewfile # Personal machine packages
│ ├── agent/Brewfile # Agent machine packages
│ └── work/Brewfile # Work machine packages
├── zsh/
│ ├── .zshenv # Sets $DOTFILES, $DOTFILES_PROFILE, Homebrew PATH
│ ├── .zshrc # Oh My Zsh, Powerlevel10k, sources conf.d/
│ └── conf.d/
│ ├── aliases.zsh
│ ├── exports.zsh # PATH exports (nvm, gcloud, etc.)
│ └── functions.zsh # Shell utilities + Claude Code helpers
├── git/
│ ├── .gitconfig # Shared config; includes ~/.gitconfig.local
│ └── .gitignore_global
└── powerlevel10k/
└── .p10k.zsh # Prompt config (regenerate with `p10k configure`)
git clone <repo> ~/dotfiles
bash ~/dotfiles/install.shThe installer will:
- Install Homebrew if missing
- Ask for a profile (
work,personal, oragent) - Run
brew bundlefor that profile's Brewfile - Install Oh My Zsh, Powerlevel10k, and zsh plugins
- Symlink dotfiles from
zsh/,git/, andpowerlevel10k/into$HOME - Create
~/.secretsfrom.secrets.example(fill in API keys/tokens) - Create
~/.gitconfig.local(fill in your name and email)
After install, open a new terminal or run source ~/.zshrc, then run p10k configure to set up your prompt.
brewupThis runs brew bundle upgrade against the active profile's Brewfile, upgrades auto-updating casks, removes packages not listed in that Brewfile, and cleans the Homebrew cache. Review unlisted packages before updating:
brew bundle cleanup --file="$DOTFILES/profiles/$DOTFILES_PROFILE/Brewfile"Brewfiles declare packages, not exact versions. Homebrew is a rolling-release package manager; Homebrew Bundle does not support version-pinning lock files. There is no Brewfile.lock.json to regenerate or commit. Commit changes to the Brewfiles themselves.
For project runtimes that need exact versions, use the already-installed mise with a project-local mise.toml containing explicit versions. This does not pin Homebrew formulae or apps.
| File | Purpose |
|---|---|
~/.secrets |
API keys, tokens — sourced by .zshrc, never committed |
~/.zshrc.local |
Shell overrides specific to this machine |
~/.gitconfig.local |
Git user name and email |
~/.dotfiles_profile |
Active profile (work, personal, or agent) — set by install.sh |
Profiles live in profiles/<name>/Brewfile. The active profile is saved to ~/.dotfiles_profile by install.sh and picked up automatically by .zshenv and the brewup function.
To add packages, edit the relevant Brewfile and run brewup.
The work and personal profiles install patched apps from the private patchark/casks tap. These casks are tap-prefixed (patchark/casks/<app>) so they don't clash with upstream Homebrew casks. The agent profile does not use this tap.
Tapping the private repo and downloading the apps both require a GitHub token. git/.gitconfig has a credential helper scoped to https://github.com/patchark that supplies the token to git, so the tap clones without stored GitHub credentials:
- Create a classic PAT with
reposcope at https://github.com/settings/tokens/new - Add it to
~/.secrets:export HOMEBREW_GITHUB_API_TOKEN=ghp_yourtoken - Open a new terminal (so
~/.secretsis sourced), then runbrewup.
Without the token, brew bundle will fail at Tapping patchark/casks with could not read Username for 'https://github.com'.
For a first install, the installer runs brew bundle before it creates ~/.secrets and links ~/.gitconfig, so the tap only works then if git already has stored GitHub credentials and the token is exported in the shell launching install.sh. Otherwise, let setup finish with package failures, fill in ~/.secrets, then open a new terminal and retry with brewup.
functions.zsh includes helpers for Claude Code MCP plugin management:
claude-plugin <name> # enable an MCP plugin in .claude/settings.local.json
claude-setup # enable serena + context7 for the current project