cli-chezmoi

Manage dotfiles through the chezmoi source repository using standard commands.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/pascalandy/dotfiles --skill cli-chezmoi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cli-chezmoi
Source: https://github.com/pascalandy/dotfiles/tree/main/dot_config/opencode/skill/util-chezmoi
Command: npx skills add https://github.com/pascalandy/dotfiles --skill cli-chezmoi

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires chezmoi, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides safe management of user dotfiles by routing changes through the chezmoi source repository instead of applying edits directly to the home directory.

Core Features & Use Cases

  • Manage dotfiles exclusively via chezmoi commands (list, edit, add, apply, diff, status, cd) to ensure traceability.
  • Prevent direct home-directory edits on managed files, enabling safe re-application of configurations across machines.
  • Use case: when onboarding a new machine, initialize chezmoi, add important config files, and apply changes to reproduce a known good state.

Quick Start

Run chezmoi to edit a file managed by the system, for example:

  • chezmoi edit ~/.zshrc
  • chezmoi apply

Frequently Asked Questions about cli-chezmoi

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I manage dotfiles safely across multiple machines?

Manage dotfiles safely by routing changes through a source repository instead of editing the home directory directly. This ensures configuration files are tracked, versioned, and safely reapplied across machines.

Why should I use chezmoi instead of directly editing home directory configs?

Editing home directory configs directly bypasses version tracking. Routing changes through chezmoi commands like edit and apply ensures modifications are traceable and can be reapplied to reproduce a known good state.

How do I edit and apply a tracked config file using chezmoi?

To edit and apply a config file, use the command `chezmoi edit ~/.zshrc` to modify the source state, then run `chezmoi apply` to write the changes safely to your home directory.

Do I need to install chezmoi before using this config management workflow?

Yes, you must install the chezmoi CLI tool before managing dotfiles. It requires the chezmoi executable to run standard commands like list, edit, add, apply, diff, status, and cd.

What is the best way to onboard a new machine with my existing dotfiles?

To onboard a new machine, initialize chezmoi, add your important config files to the source repo, and run apply. This reproduces a known good state by safely reapplying your tracked configurations.

Can I see pending changes before applying dotfile updates?

Yes, you can see pending changes before applying updates. Use the chezmoi diff command to view differences between the source state and your home directory, then use status to check tracked file states.