Chezmoi

Chezmoi

Open-source command-line tool for managing your personal “dotfiles” and configuration files across multiple machines.

Documentation: https://www.chezmoi.io/
Repository: https://github.com/twpayne/chezmoi


Setup

  1. Install Chezmoi.
# Windows
winget install twpayne.chezmoi

# Arch
sudo pacman -S chezmoi

# MacOS
brew install chezmoi
  1. Initialize a new or existing repository.

Existing Repository:

chezmoi init <dotfile-repo>
chezmoi -v apply

# <dotfile-repo> ex. https://gitea.nodusk.me/jay/dotfiles.git

New Repository:

chezmoi init
cd ~/.local/share/chezmoi

git init
git add .
git commit -m "inital commit"
git remote add origin git@github.com:<github-username>/dotfiles.git
git push -u origin main

Usage

# chezmoi commands (reference)
chezmoi add <path> # add new directory or file from chezmoi
chezmoi forget <path> # remove directory or file from chezmoi
chezmoi edit <path> # edit file (or just edit some other way)
chezmoi diff # view changes
chezmoi -v apply # print log and apply changes
chezmoi -v -n apply # print log
chezmoi init <git-url> # initialize dotfiles from git
chezmoi merge <file> # merge conflicts from local and remote
chezmoi update -v # pull and apply changes from remote repo
Powered by Forestry.md