Daily Commands
These are the commands you’ll use most frequently:- init - Setup the source directory and optionally clone a repository
- add - Add files to the source state
- edit - Edit the source state of files
- apply - Update the destination directory to match the target state
- update - Pull changes from the source repository and apply them
- status - Show the status of managed files
- diff - Show differences between target and destination state
- merge - Perform three-way merges between states
Inspection Commands
Commands for inspecting the state of your dotfiles:- cat - Print the target contents of a file
- execute-template - Execute templates
- managed - List managed files
- unmanaged - List unmanaged files
- verify - Verify the destination state matches the target state
Utility Commands
Utility commands for working with chezmoi:- cd - Launch a shell in the source directory
- doctor - Check your system for potential problems
- upgrade - Upgrade chezmoi to the latest version
- completion - Generate shell completion scripts
Global Flags
All commands support these global flags:--colorvalue - Colorize output (defaultauto, options:on,off,auto)--configpath - Set config file path--config-formatformat - Set config file format (json, jsonc, toml, yaml)--debug- Include debug information in output--destinationpath - Set destination directory--dry-run/-n- Run without making changes--force- Make changes without prompting--sourcepath - Set source directory--verbose/-v- Make output more verbose--working-treepath - Set working tree directory
Exit Codes
chezmoi uses the following exit codes:0- Success1- Generic error2- Verification failed (used byverifycommand)
Command Aliases
Some commands have shorter aliases:manage→addlist→managed