chezmoi

Track and manage dotfiles with chezmoi while preventing destructive commands.

2|Updated Nov 9, 2023
One-click install
npx skills add https://github.com/MasonRhodesDev/dotfiles --skill chezmoi-masonrhodesdev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: chezmoi
Source: https://github.com/MasonRhodesDev/dotfiles/tree/main/dot_claude/skills/chezmoi
Command: npx skills add https://github.com/MasonRhodesDev/dotfiles --skill chezmoi-masonrhodesdev

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires chezmoi.

What problem does it solve?

Manually managing configuration files (dotfiles) across multiple machines is tedious, error-prone, and makes system setup a chore. This skill provides a safe, automated way to track, compare, and update dotfiles using chezmoi, ensuring consistency and saving time on system configuration.

Core Features & Use Cases

  • Safe Configuration Tracking: Add local changes to chezmoi's source control without destructive overwrites.
  • Difference & Status Checks: Easily view discrepancies between tracked and local files, or see which files need updates.
  • Template Management: Test chezmoi templates to ensure they render as expected before applying.
  • Use Case: A user has made changes to their ~/.bashrc and wants to save these changes to their dotfiles repository. This skill guides them to use chezmoi add ~/.bashrc to safely track the changes, then chezmoi diff to review, and finally commit the changes to git.

Quick Start

Use the chezmoi skill to check the status of your dotfiles and see what changes are pending.

Frequently Asked Questions about chezmoi

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

FAQPage Schema
How do I track dotfile changes across machines without losing local configuration?

Dotfile management with chezmoi tracks your configuration files in version control, preventing drift across systems. Use `chezmoi add` to safely capture local changes, then `chezmoi diff` to review before committing to your repository, ensuring consistency without overwriting.

What's the difference between checking dotfile status and applying changes?

`chezmoi status` shows which files differ between your repository and local system, while `chezmoi diff` displays the exact changes. This Skill prioritizes safety by supporting status and diff operations but disallowing destructive apply commands, letting you review changes first.

Can I use templates to customize dotfiles for different machines?

Yes. Chezmoi supports `.tmpl` templates that render configuration files dynamically. Use `chezmoi execute-template` to test template output before deployment, ensuring your templated dotfiles generate correctly for each target system.

How do I add an existing configuration file to chezmoi's management?

`chezmoi add` safely imports local configuration files into chezmoi's source control without destructive overwrites. After adding, run `chezmoi diff` to confirm the tracked version matches your local file, then commit to your dotfiles repository.

Why should I use chezmoi instead of manually copying dotfiles?

Chezmoi automates dotfile synchronization with version control, reducing manual work and configuration drift across machines. It provides safe workflows—checking status, diffing changes, and testing templates—that prevent accidental overwrites while keeping your system setup reproducible.

What happens if my local dotfile diverges from the repository version?

`chezmoi diff` reveals discrepancies between tracked and local files so you can decide whether to update locally or re-add the file to capture new changes. This prevents silent configuration drift and keeps you aware of what's managed versus local-only.