status command prints the status of managed files and scripts in a format similar to git status.
Usage
Description
Thestatus command shows a two-character status code for each managed file:
- First column: Difference between the last state written by chezmoi and the actual state
- Second column: Difference between the actual state and the target state (what
chezmoi applywill do)
Status Codes
| Character | Meaning | First Column | Second Column |
|---|---|---|---|
| Space | No change | No change | No change |
A | Added | Entry was created | Entry will be created |
D | Deleted | Entry was deleted | Entry will be deleted |
M | Modified | Entry was modified | Entry will be modified |
R | Run | Not applicable | Script will be run |
Flags
Exclude entry types (comma-separated:
dirs, files, remove, scripts, symlinks, always, encrypted, externals, templates).Include only specified entry types (comma-separated:
dirs, files, remove, scripts, symlinks, always, encrypted, externals, templates).Recreate the config file from the template in the source directory.
Show status of all parent directories.
Path style to use in output. Options:
absolute, relative. Can be configured via status.pathStyle in the config file.Recurse into subdirectories.
Examples
Show status of all managed files
Show status with absolute paths
Show status for specific files
Terminal Output
Interpreting Output
Clean state (no output)
Modified in destination
.bashrc locally. chezmoi apply will overwrite it with the target state.
Modified in source
Modified in both
chezmoi diff or chezmoi merge to resolve.
Will be added
chezmoi apply.
Will be deleted
.vimrc from the source state. chezmoi apply will remove it from your home directory.
Script will run
chezmoi apply.
Common Workflows
Before applying changes
After making local changes
After pulling from repository
Checking for conflicts
Exit Code
Thestatus command exits with code 0 even if there are differences. Use the output to determine if action is needed.