Command overview
Getting started
-
chezmoi doctorchecks for common problems. If you encounter something unexpected, run this first. -
chezmoi initcreates chezmoi's source directory and a git repo on a new machine.
Daily commands
-
chezmoi add $FILEadds$FILEfrom your home directory to the source directory. -
chezmoi edit $FILEopens your editor with the file in the source directory that corresponds to$FILE. -
chezmoi statusgives a quick summary of what files would change if you ranchezmoi apply. -
chezmoi diffshows the changes thatchezmoi applywould make to your home directory. -
chezmoi applyupdates your dotfiles from the source directory. -
chezmoi edit --apply $FILEis likechezmoi edit $FILEbut also runschezmoi apply $FILEafterwards. -
chezmoi cdopens a subshell in the source directory.
Using chezmoi across multiple machines
-
chezmoi init $GITHUB_USERNAMEclones your dotfiles from GitHub into the source directory. -
chezmoi init --apply $GITHUB_USERNAMEclones your dotfiles from GitHub into the source directory and runschezmoi apply. -
chezmoi updatepulls the latest changes from your remote repo and runschezmoi apply. -
Use normal git commands to add, commit, and push changes to your remote repo.
Working with templates
-
chezmoi dataprints the available template data. -
chezmoi add --template $FILEadds$FILEas a template. -
chezmoi chattr +template $FILEmakes an existing file a template. -
chezmoi cat $FILEprints the target contents of$FILE, without changing$FILE. -
chezmoi execute-templateis useful for testing and debugging templates.