Skip to content

Install

The latest version of chezmoi is 2.27.2 (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
pkg install chezmoi
pkg install application/chezmoi

chezmoi is available in many cross-platform package managers:

asdf plugin add chezmoi && asdf install chezmoi 2.27.2
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)"
(irm -useb https://get.chezmoi.io/ps1) | powershell -c -

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

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.18 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.27.2/chezmoi_2.27.2_checksums.txt \
       https://github.com/twpayne/chezmoi/releases/download/v2.27.2/chezmoi_2.27.2_checksums.txt.sig \
       https://github.com/twpayne/chezmoi/releases/download/v2.27.2/chezmoi_cosign.pub

Verify the signature of the checksum file with cosign.

$ cosign verify-blob --key=chezmoi_cosign.pub \
                     --signature=chezmoi_2.27.2_checksums.txt.sig \
                     chezmoi_2.27.2_checksums.txt

Important

cosign should print Verified OK

Verify the that the SHA256 sum of your downloads match the SHA256 sum in the verified checksum file. All your downloads must be in the current directory.

$ sha256sum --check chezmoi_2.27.2_checksums.txt --ignore-missing
$ shasum --algorithm 256 --check chezmoi_2.27.2_checksums.txt --ignore-missing

For more information on chezmoi's release signing process, see the developer documentation on chezmoi's releases.