Apply Chezmoi Changes
Apply chezmoi dotfile changes from the source repository to their target locations.
Instructions
- •
First, preview the changes that will be applied:
- •Run
chezmoi diffto show what will change - •Review the diff output to understand what operations will occur
- •Run
- •
Interpret the diff correctly:
- •Check
chezmoi statusto see file operation codes (A=add, M=modify, R=run script) - •Files with status "R" are scripts that will be EXECUTED, not created
- •Scripts with
run_once_,run_onchange_, orrun_prefixes execute but don't create files - •Regular files (with
dot_,private_,executable_prefixes) will be created/modified - •Report scripts as "will execute" and files as "will be created/modified"
- •Check
- •
Apply the changes:
- •Run
chezmoi applyto deploy all pending changes - •This updates the target files and executes any run scripts
- •Run
- •
Verify and report:
- •Confirm the command completed successfully
- •Report any errors or conflicts to the user
- •Summarize what was deployed vs what was executed
Important
- •Always show the diff before applying when making significant changes
- •Never modify deployed files directly (e.g.,
~/.zshrc) - always edit the chezmoi source - •If conflicts occur, check for manual edits in target locations
- •Use
chezmoi apply --forceonly when explicitly requested
Allowed Operations
This skill grants permission to run:
- •
chezmoi diff- Preview changes - •
chezmoi apply- Apply changes to target locations