explaingit

twpayne/chezmoi

Analysis updated 2026-06-21

19,701GoAudience · developerComplexity · 2/5Setup · easy

TLDR

A command-line tool that tracks and syncs your configuration files across multiple computers, keeping your development environment consistent on every machine you use, and handling secrets safely.

Mindmap

mindmap
  root((repo))
    What It Does
      Dotfile manager
      Multi-machine sync
      Secret handling
    Tech Stack
      Go
    Use Cases
      Cross-machine sync
      New machine setup
      Work vs home config
    Features
      Encrypted secrets
      Per-machine templates
      Git-backed storage
    Audience
      Developers
      Power users
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Keep your .bashrc.vimrc, and .gitconfig in sync across your home laptop, work desktop, and remote servers.

USE CASE 2

Store sensitive values like API keys in your dotfiles without exposing them in plain text in a git repository.

USE CASE 3

Bootstrap a new machine's entire development environment by running chezmoi apply on a fresh install.

USE CASE 4

Maintain different dotfile variants for work versus personal machines from a single central repository.

What is it built with?

Go

How does it compare?

twpayne/chezmoicharmbracelet/vhsahmetb/kubectx
Stars19,70119,68219,732
LanguageGoGoGo
Setup difficultyeasyeasyeasy
Complexity2/52/51/5
Audiencedeveloperdeveloperops devops

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 30min

Requires a git repository such as GitHub or GitLab to store and sync dotfiles across machines.

In plain English

Chezmoi is a tool for managing "dotfiles", the hidden configuration files (like .bashrc, .vimrc, or .gitconfig) that control how your development tools behave on a computer. The problem it solves is keeping those settings in sync when you work across multiple machines: a home laptop, a work desktop, and a remote server might all need the same setup. Chezmoi tracks your dotfiles in a central repository and applies them consistently across every machine. It also handles sensitive values like passwords or API keys securely, without exposing them in plain text. Written in Go, it runs on Linux and macOS and is documented at chezmoi.io.

Copy-paste prompts

Prompt 1
Help me set up chezmoi from scratch: initialize a dotfile repo, add my .bashrc and .gitconfig, push to GitHub, then apply those files on a second machine.
Prompt 2
I want to store my SSH config and API keys in chezmoi without committing plain-text secrets to git. Show me how to use chezmoi secret management to encrypt sensitive files.
Prompt 3
Write a chezmoi template so my .gitconfig automatically uses my work email on my work machine and my personal email at home, based on the hostname.
Prompt 4
I have messy dotfiles on two computers. Show me how to use chezmoi to consolidate them into one repo and handle the differences between machines.
Prompt 5
Show me how to use chezmoi age encryption to store a secret API key in my dotfiles repo so it is encrypted at rest but decrypted automatically on apply.

Frequently asked questions

What is chezmoi?

A command-line tool that tracks and syncs your configuration files across multiple computers, keeping your development environment consistent on every machine you use, and handling secrets safely.

What language is chezmoi written in?

Mainly Go. The stack also includes Go.

How hard is chezmoi to set up?

Setup difficulty is rated easy, with roughly 30min to a first successful run.

Who is chezmoi for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Scan in gitsafehub Deploy in gitdeployhub twpayne on gitmyhub

Verify against the repo before relying on details.