Install
The latest version of chezmoi is 2.54.0 (release notes, release history).
One-line package install
Install chezmoi with your package manager with a single command:
apk add chezmoi
pacman -S chezmoi
nix-env -i chezmoi
zypper install chezmoi
pkg install chezmoi
xbps-install -S chezmoi
brew install chezmoi
port install chezmoi
nix-env -i chezmoi
choco install chezmoi
scoop install chezmoi
winget install twpayne.chezmoi
pkg install chezmoi
pkg install application/chezmoi
chezmoi is available in many cross-platform package managers:
asdf plugin add chezmoi && asdf install chezmoi 2.54.0
brew install chezmoi
nix-env -i chezmoi
snap install chezmoi --classic
For more packages, see chezmoi on repology.org.
One-line binary install
Install the correct binary for your operating system and architecture in ./bin
with a single command:
sh -c "$(curl -fsLS get.chezmoi.io)"
sh -c "$(wget -qO- get.chezmoi.io)"
iex "&{$(irm 'https://get.chezmoi.io/ps1')}"
To provide the script with arguments, place them at the end of the quote:
iex "&{$(irm 'https://get.chezmoi.io/ps1')} -b '~/bin'"
Hint
If you already have a dotfiles repo using chezmoi on GitHub at
https://github.com/$GITHUB_USERNAME/dotfiles
then you can install
chezmoi and your dotfiles with the single command:
sh -c "$(curl -fsLS get.chezmoi.io)" -- init --apply $GITHUB_USERNAME
Private GitHub repos require other authentication methods:
sh -c "$(curl -fsLS get.chezmoi.io)" -- init --apply git@github.com:$GITHUB_USERNAME/dotfiles.git
Hint
If you want to install chezmoi in ./.local/bin
instead of ./bin
you can
use get.chezmoi.io/lb
or chezmoi.io/getlb
instead.
Hint
To install the chezmoi binary in a different directory, use the -b
option,
for example:
sh -c "$(curl -fsLS get.chezmoi.io)" -- -b $HOME/.local/bin
Download a pre-built Linux package
Download a package for your distribution and architecture.
Download a pre-built binary
Download an archive for your operating system and architecture containing a pre-built binary and shell completions.
Install from source
Download, build, and install chezmoi for your system with Go 1.22 or later:
$ git clone https://github.com/twpayne/chezmoi.git
$ cd chezmoi
$ make install-from-git-working-copy
Verify your download
chezmoi's release process signs the SHA256 checksums of all released assets with cosign.
To verify an asset that you have downloaded:
Download the checksum file, checksum file signature, and public signing key.
$ curl --location --remote-name-all \
https://github.com/twpayne/chezmoi/releases/download/v2.54.0/chezmoi_2.54.0_checksums.txt \
https://github.com/twpayne/chezmoi/releases/download/v2.54.0/chezmoi_2.54.0_checksums.txt.sig \
https://github.com/twpayne/chezmoi/releases/download/v2.54.0/chezmoi_cosign.pub
Verify the signature of the checksum file with cosign.
$ cosign verify-blob --key=chezmoi_cosign.pub \
--signature=chezmoi_2.54.0_checksums.txt.sig \
chezmoi_2.54.0_checksums.txt
Important
cosign should print Verified OK
Verify the that the SHA256 sum of your downloads matches the SHA256 sum in the verified checksum file. All the downloaded files must be in the current directory.
$ sha256sum --check chezmoi_2.54.0_checksums.txt --ignore-missing
$ shasum --algorithm 256 --check chezmoi_2.54.0_checksums.txt --ignore-missing
For more information on chezmoi's release signing process, see the developer documentation on chezmoi's releases.