Skip to main content

Install chezmoi

chezmoi is distributed as a single stand-alone statically-linked binary with no dependencies. You can install it using your package manager, download a pre-built binary, or build from source.

One-Line Package Install

Install chezmoi with your package manager with a single command:
apk add chezmoi

Cross-Platform Package Managers

chezmoi is also available in several cross-platform package managers:
asdf plugin add chezmoi && asdf install chezmoi latest
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)"
If you already have a dotfiles repo on GitHub at https://github.com/$GITHUB_USERNAME/dotfiles, you can install chezmoi and your dotfiles with a single command:
sh -c "$(curl -fsLS get.chezmoi.io)" -- init --apply $GITHUB_USERNAME
For private repos, use SSH authentication:
sh -c "$(curl -fsLS get.chezmoi.io)" -- init --apply [email protected]:$GITHUB_USERNAME/dotfiles.git

Customize Installation Directory

By default, the install script places the binary in ./bin. You can customize this:
sh -c "$(curl -fsLS get.chezmoi.io)" -- -b $HOME/.local/bin

Download Pre-Built Packages

Download a package for your distribution and architecture from the latest release:
Available architectures:
  • amd64 (x86_64)
  • arm64 (aarch64)
  • armel, armhf
  • i386
  • ppc64, ppc64le
  • riscv64
  • s390x
  • loong64
Download from: https://github.com/twpayne/chezmoi/releases/latest

Download Pre-Built Binaries

Download an archive for your operating system and architecture containing a pre-built binary and shell completions:
Download .tar.gz archives for:
  • amd64, i386
  • arm, arm64
  • ppc64, ppc64le
  • riscv64
  • s390x
  • loong64, mips64, mips64le
Special builds:
  • linux-glibc_amd64 - glibc version
  • linux-musl_amd64 - musl version
  • android_arm64 - Termux
Download from GitHub Releases →

Build from Source

Build and install chezmoi with Go 1.25 or later:
1

Clone the repository

git clone https://github.com/twpayne/chezmoi.git
cd chezmoi
2

Build and install

make install-from-git-working-copy

Verify Your Download

chezmoi’s release process signs the SHA256 checksums of all released assets with cosign.
1

Download verification files

Download the checksum file, signature, and public key:
VERSION=$(curl -s https://api.github.com/repos/twpayne/chezmoi/releases/latest | grep tag_name | cut -d'"' -f4 | sed 's/v//')
curl --location --remote-name-all \
  https://github.com/twpayne/chezmoi/releases/download/v${VERSION}/chezmoi_${VERSION}_checksums.txt \
  https://github.com/twpayne/chezmoi/releases/download/v${VERSION}/chezmoi_${VERSION}_checksums.txt.sig \
  https://github.com/twpayne/chezmoi/releases/download/v${VERSION}/chezmoi_cosign.pub
2

Verify the signature

Verify the signature with cosign:
cosign verify-blob --key=chezmoi_cosign.pub \
  --signature=chezmoi_${VERSION}_checksums.txt.sig \
  chezmoi_${VERSION}_checksums.txt
cosign should print Verified OK. Do not proceed if verification fails.
3

Verify checksums

Verify the SHA256 sum of your download matches the verified checksum file:
sha256sum --check chezmoi_${VERSION}_checksums.txt --ignore-missing

Next Steps

Quick Start

Learn how to start using chezmoi

User Guide

Understand chezmoi’s concepts and workflow

Build docs developers (and LLMs) love