Manage dotfiles with chezmoi. Use when working with chezmoi config, setup, or repo structure, managing files, templates, or script's (Go template syntax, run_once_/run_onchange_ scripts, .chezmoidata), handling file attributes (symlinks, permissions, encryption, external sources), Troubleshooting chezmoi operations or understanding application order.
chezmoi diff or chezmoi cat <file> before any applying.~) - Your actual dotfiles (destination state)~/.local/share/chezmoi/) - Chezmoi's managed files (source state)Chezmoi encodes file attributes in filenames:
dot_bashrc → ~/.bashrcprivate_dot_netrc → ~/.netrc (restricted permissions)executable_dot_local/bin/script → ~/.local/bin/script (executable)~/.local/share/chezmoi/
├── .chezmoiroot # Root directory specifier
└── home/ # $HOME directory
├── .chezmoidata/ # Custom template data
├── .chezmoiexternals/ # External resource config
├── .chezmoiscripts/ # Script directory
├── .chezmoitemplates/ # Reusable partial templates
├── .chezmoi.toml.tmpl # Config template (prompts during init)
├── .chezmoiremove.tmpl # Patterns of files to remove on apply
├── .chezmoiignore # Ignore patterns
└── .chezmoiversion # Minimum version specifier
.chezmoi* files and directories control chezmoi behavior.dot_, private_, .tmpl, etc)..chezmoiscripts/ run during apply. Format: run_[once_|onchange_][before_|after_]<order>-<name>.<ext>[.tmpl]chezmoi, variables, and functions.chezmoiexternals/ which is fetched from URLs, archives, and git repositories