This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is a personal macOS dotfiles repository based on Holman's dotfiles architecture. It uses a topic-based organization where each top-level directory represents a "topic" (e.g., zsh/, git/, docker/). The repository manages system configuration, shell settings, and software installation on macOS through symlinks and automated scripts.
- Each directory is a "topic" containing related configuration files
- Files ending in
.symlinkare automatically symlinked to$HOMEas dotfiles (e.g.,git/gitconfig.symlink→~/.gitconfig) - Files named
path.zshare loaded first to configure$PATH - Files named
*.zsh(exceptpath.zshandcompletion.zsh) are auto-loaded by zsh - Files named
completion.zshare loaded last for shell completions - Files named
install.share executed during installation
The zsh/zshrc.symlink file orchestrates all shell configuration:
- Sources
~/.localrcif present (for local/private env variables) - Loads all
*/path.zshfiles - Loads all
*.zshfiles (excluding path.zsh and completion.zsh) - Initializes autocompletion
- Loads all
*/completion.zshfiles
git clone git@github.com:derpaschi/dotfiles.git ~/.dotfiles
cd ~/.dotfiles
git submodule init
git submodule update --recursive --remote
script/bootstrapThe bootstrap script:
- Prompts for hostname and configures system name
- Creates
git/gitconfig.local.symlinkfrom template (if missing) - Symlinks all
*.symlinkfiles to$HOME - Runs
bin/dotto install dependencies
Set zsh as default shell:
# Add homebrew zsh to allowed shells (use the path matching your architecture)
# Apple Silicon: /opt/homebrew/bin/zsh
# Intel Mac: /usr/local/bin/zsh
sudo vim /etc/shells # add the appropriate zsh path
chsh -s /opt/homebrew/bin/zshdotThe dot command:
- Updates dotfiles repository (
git pull) - Applies macOS defaults (
macos/set-defaults.sh) - Sets hostname (
macos/set-hostname.sh) - Installs/updates Homebrew
- Runs
brew bundleto install/update software from Brewfile - Executes all
install.shscripts
script/bootstrap- Initial setup scriptscript/install- Runsbrew bundleand allinstall.shfilesbin/dot- Main update/maintenance commandbin/mac-backup- Backup GUI app settings to Dropbox via mackup (before switching devices)bin/mac-sync- Pull dotfiles + restore app settings (when switching to this Mac)bin/mac-restore- Interactive restore assistant for fresh Mac setupsbin/gpg-backup- Export GPG keys for 1Password backup
Brewfile- Homebrew packages and casks to installgit/gitconfig.symlink- Main git configurationgit/gitconfig.local.symlink- Local git config (generated, not tracked)zsh/zshrc.symlink- Main zsh configurationmackup/mackup.cfg.symlink- mackup config (allowlist of GUI apps synced via Dropbox)localrc.example- Template for~/.localrc(private env vars, not tracked)~/.localrc- Local environment variables (not tracked, sourced if present)
App settings for GUI apps (Cursor, iTerm2, VS Code, Sublime Text, TablePlus, Tower, Transmit, etc.) are synced between Macs via mackup (copy mode) through Dropbox. Shell/Git/macOS config is managed by this dotfiles repo — mackup only handles GUI app preferences to avoid conflicts.
- Switching devices:
mac-backupon the old Mac,mac-syncon the new Mac - Fresh Mac setup:
script/bootstrapthenmac-restore
Defined across various aliases.zsh files:
reload!- Reload zsh configurationd/d-c- Docker shortcutsdockerwp- Run WP-CLI in Docker containerserver <cmd>- Execute composer server commandscomposer- Wrapper that checks git connectivity first
$ZSH- Points to~/.dotfilesWP_I18N_LIB- WordPress i18n library path (set if~/Development/tools/wpi18nexists)
The environment is configured for:
- PHP: PHP 8.3 via Homebrew (in PATH)
- Node.js: Managed via
fnm(Fast Node Manager) - Ruby: Managed via
rbenv - Composer: Global vendor binaries in PATH
- Docker: With completions and Docker Compose
- Pygmy: Local development environment tool
When modifying this dotfiles repository:
- Adding new shell configuration: Create a
.zshfile in the appropriate topic directory - Adding PATH entries: Create or modify a
path.zshfile in the topic directory - Adding shell completions: Create or modify a
completion.zshfile in the topic directory - Adding new dotfiles: Create a
.symlinkfile in the appropriate topic directory - Adding new software: Add to
Brewfile - Topic-specific setup: Add an
install.shscript to the topic directory
After making changes, run dot to apply updates system-wide.