chezmoi helps you manage your personal configuration files (dotfiles, like ~/.bashrc) across multiple machines. It has strong support for security, allowing you to manage secrets (e.g. passwords, access tokens, and private keys) securely and seamlessly using a password manager of your choice or GnuPG encryption.
Source code available at GitHub.
You can install
chezmoi using your package manager or by runnig the following command:
curl -sfL https://git.io/chezmoi | sh
This will install correct binary in
If you have installed a pre-built binary of chezmoi, you can upgrade it to the latest release with:
Initialize chezmoi repository:
This will create a new git repository in
~/.local/share/chezmoiwith permissions 0700 where chezmoi will store the source state. chezmoi only modifies files in the working copy. It is your responsibility to commit changes.
Manage an existing file with chezmoi:
chezmoi add ~/.bashrc
This will copy
-rto add whole folder.
Edit source state of configuration file:
chezmoi edit ~/.bashrc
This will open
~/.local/share/chezmoi/dot_bashrcin your $EDITOR.
See what changes will be made:
Apply changes to actual dotfiles:
chezmoi -v apply
-vfor verbose output and
-nfor dry run.
Restore dotfiles on another machine:
chezmoi init https://gitlab.com/username/dotfiles.git chezmoi apply
Launch a shell in the source directory:
List the managed files in the destination directory:
Remove a target from the source state (stop managing):
chezmoi forget ~/.bashrc
Pull latest changes from repository:
chezmoi have much more functionality. Read more at chezmoi.io.