Skip to main content
chezmoi provides a comprehensive set of commands for managing your dotfiles. Commands are organized into the following categories:

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:
  • --color value - Colorize output (default auto, options: on, off, auto)
  • --config path - Set config file path
  • --config-format format - Set config file format (json, jsonc, toml, yaml)
  • --debug - Include debug information in output
  • --destination path - Set destination directory
  • --dry-run / -n - Run without making changes
  • --force - Make changes without prompting
  • --source path - Set source directory
  • --verbose / -v - Make output more verbose
  • --working-tree path - Set working tree directory

Exit Codes

chezmoi uses the following exit codes:
  • 0 - Success
  • 1 - Generic error
  • 2 - Verification failed (used by verify command)

Command Aliases

Some commands have shorter aliases:
  • manageadd
  • listmanaged

Build docs developers (and LLMs) love