← Back to articles

chezmoi

Path: Computer Tech/System Configuration/Environment Setup/Dev Environment and Versioning/chezmoi.mdUpdated: 2/3/2026

Part 1: The Replicable Local Setup (chezmoi, pyenv & venv)

In the world of software development, writing code is only half the battle. The other half is managing the environment in which that code runs. This story follows two developers, Alex and Ben, as they build a robust, reproducible workflow from the ground up, starting not with the project, but with the developer's machine itself.

Chapter 1: Alex Creates a Portable Command Center (chezmoi)

Meet Alex. Alex is a thoughtful developer who works on a laptop at the office and a desktop at home. He's tired of his tools and shell feeling slightly different on each machine. His shell aliases, his Git configuration, his editor settings—keeping them in sync is a manual, error-prone chore. He wants his command center to be identical, no matter where he is.

His solution isĀ chezmoi, a powerful dotfile manager. It allows him to store his configuration files (dotfiles likeĀ .zshrc,Ā .gitconfig,Ā .vimrc) in a Git repository and apply them to any machine with a single command.

Step 1: Storing the Configuration

Alex initializesĀ chezmoiĀ and starts adding his essential configuration files to its managed source state.

# Alex adds his Zsh shell configuration
$ chezmoi add ~/.zshrc

# He adds his global Git configuration
$ chezmoi add ~/.gitconfig

He also adds the script that installs his favorite tools, includingĀ pyenv, the Python version manager. Now,Ā chezmoiĀ not only manages his configuration but also the setup of his core development tools. He pushes hisĀ chezmoiĀ repository to a private Git repo.

This is Alex'sĀ Zeroth Point of Certainty: His personal development environment is now portable and version-controlled. When he gets a new machine, his first command will beĀ chezmoi init, instantly making it feel like home.