| name | dotfiles |
| description | Manage dotfiles with chezmoi |
| allowed-tools | Bash, Read, Grep, Glob, Edit, Write |
Dotfiles Management
Manage this dotfiles repository with chezmoi.
Repository structure
dotfiles/
├── .chezmoiroot # Points to "home" as source
├── .chezmoiversion # Minimum chezmoi version
└── home/ # Source directory
├── .chezmoi.toml.tmpl # Config with template vars
├── .chezmoiexternal.toml # External dependencies
├── .chezmoitemplates/ # Reusable templates
│ └── common.tmpl # Logging, utilities
├── .chezmoiscripts/ # Automation scripts
│ ├── packages/ # Homebrew, Node.js, Rust
│ ├── editors/ # VS Code, Vim plugins
│ ├── security/ # GPG import
│ ├── system/darwin/ # macOS settings
│ ├── tools/ # Claude MCP, etc.
│ └── verify/ # Post-deploy checks
├── dot_config/ # ~/.config/ files
└── [other dotfiles]
Common operations
Preview changes
chezmoi diff
Apply changes
chezmoi apply -v
Add a file to chezmoi
chezmoi add ~/.newfile
View rendered template
chezmoi cat ~/.zshrc
Check available template data
chezmoi data
Force refresh externals
chezmoi apply --refresh-externals
Creating new scripts
- Create in appropriate directory under
home/.chezmoiscripts/
- Use naming convention:
run_[before|after|onchange]_category_name.sh.tmpl
- Include required header:
{{- if .is_mac -}}
set -euo pipefail
{{ template "common.tmpl" . }}
{{- end -}}
Template debugging
chezmoi execute-template '{{ .is_mac }}'
chezmoi execute-template '{{ .with_docker }}'