Skip to content

Command overview

Getting started

  • chezmoi doctor checks for common problems. If you encounter something unexpected, run this first.

  • chezmoi init creates chezmoi's source directory and a git repo on a new machine.

Daily commands

  • chezmoi add $FILE adds $FILEfrom your home directory to the source directory.

  • chezmoi edit $FILE opens your editor with the file in the source directory that corresponds to $FILE.

  • chezmoi status gives a quick summary of what files would change if you ran chezmoi apply.

  • chezmoi diff shows the changes that chezmoi apply would make to your home directory.

  • chezmoi apply updates your dotfiles from the source directory.

  • chezmoi edit --apply $FILE is like chezmoi edit $FILE but also runs chezmoi apply $FILE afterwards.

  • chezmoi cd opens a subshell in the source directory.

sequenceDiagram participant H as home directory participant W as working copy participant L as local repo participant R as remote repo H->>W: chezmoi add <file> W->>W: chezmoi edit <file> W-->>H: chezmoi status W-->>H: chezmoi diff W->>H: chezmoi apply W->>H: chezmoi edit --apply <file> H-->>W: chezmoi cd

Using chezmoi across multiple machines

sequenceDiagram participant H as home directory participant W as working copy participant L as local repo participant R as remote repo R->>W: chezmoi init <github-username> R->>H: chezmoi init --apply <github-username> R->>H: chezmoi update <github-username> W->>L: git commit L->>R: git push

Working with templates

Back to top