chezmoi

chezmoi dotfile management. apply - interactive diff review per file [apply.md], consolidate - merge duplicate templates [consolidate.md], cross-platform - Windows/macOS compatibil…

es6kr

@drumrobot

Install

$ openclaw skills install @drumrobot/chezmoi

chezmoi

chezmoi dotfile template management and workflow automation.

Topics

TopicDescriptionGuide
applyInteractive diff review — per-file AskUserQuestion approval + commit-tidyapply.md
consolidateDetect duplicate modify templates and generate shared scriptsconsolidate.md
cross-platformmacOS/Windows compatibility diagnostics and fixescross-platform.md
doctorCheck required files and auto-copy if missingdoctor.md
mcp-syncMCP server configuration synchronizationmcp-sync.md

Related Skills

FeatureSkill
Commit splittingcommit-splitter

Quick Reference

Apply (Interactive Diff Review)

"chezmoi apply"             → Per-file diff review + AskUserQuestion approval
"chezmoi diff"              → Show all changes, decide per file

Consolidate (Template Merging)

"chezmoi check duplicates"  → Detect templates with identical content
"merge templates"           → Consolidate into shared scripts

Doctor (Environment Validation)

"chezmoi doctor"            → Check for required scripts
"missing script"            → Auto-copy scripts to ~/bin/

MCP Sync (MCP Synchronization)

"add MCP server"            → Add to mcp-servers.json and apply
"MCP sync"                  → Propagate MCP config to all apps

Directory Structure

~/.local/share/chezmoi/
├── .chezmoi-lib/              # Shared scripts
│   ├── executable_vscode-settings.sh
│   ├── executable_vscode-keybindings.sh
│   ├── executable_mcp-servers.sh
│   ├── executable_generate-utcp-config.sh
│   └── executable_sourcegit-preference.sh
├── .chezmoitemplates/         # Shared data
│   └── mcp-servers.json       # MCP server single source of truth
├── .chezmoiignore             # OS-specific path branching
├── modify_*.sh.tmpl           # Per-app modify templates
├── private_Library/           # macOS app settings
│   └── private_Application Support/
└── AppData/                   # Windows app settings
    ├── Roaming/               # %APPDATA%
    └── Local/                 # %LOCALAPPDATA%

Required Validation Before Apply

Always run chezmoi diff to review changes before any chezmoi apply.

# 1. Preview changes
chezmoi diff

# 2. Apply after user approval
chezmoi apply
  • Skip apply if diff output is empty
  • Show diff results to user and get approval via AskUserQuestion
  • See the chezmoi section in ~/.agent/rules/iac.md

Top skills in this category