chezmoi-tui
chezmoi-tui is a Rust TUI that makes day-to-day chezmoi operations easier to inspect and run.
It focuses on visual clarity, fast navigation, and safer execution for common workflows.
Why
chezmoi is powerful, but CLI-only usage can hide important context:
- what changed
- what is managed vs unmanaged
- which action is safe to run next
chezmoi-tui wraps core operations in a 3-pane interface with view-aware actions and safety checks.
Scope
This project intentionally implements a practical subset of chezmoi commands.
View behavior:
| View | Data base path | Auto detail on selection | Tree expand/collapse |
|---|---|---|---|
status |
Home destination | Diff | No |
managed |
Home destination | File preview | Yes |
unmanaged |
Current working directory | File preview | Yes |
Notes:
- Symlink directories are shown as directories, but they are not expanded by default.
- In
managed/unmanagedtrees, symlink markers are:[L]for symlink directoriesLfor symlink files@suffix on symlink names
Installation
Requirements
- Rust 1.85+ (edition 2024)
chezmoiinPATH- macOS or Linux
Install from crates.io (recommended)
Run installed binary
Run from source (development)
Usage
Start the app and refresh once to load current state:
# then press r
Core Workflow
- Press
rto refresh. - Switch views with
1/2/3. - Move with
j/kor arrow keys. - In
status, diff is auto-loaded for selected file. - In
managed/unmanaged, preview is auto-loaded for selected file. - Use
Spaceto mark multiple items and run batch actions froma.
Keybindings
Global:
| Key | Behavior |
|---|---|
1 / 2 / 3 |
Switch view (status, managed, unmanaged) |
Tab |
Cycle focus (List -> Detail -> Log) |
a |
Open action menu |
r |
Refresh all lists |
? |
Toggle footer help hints |
q / Ctrl+C |
Quit |
List focus:
| Key | Behavior |
|---|---|
j / k or ↑ / ↓ |
Move selection |
/ |
Open list filter |
Space |
Toggle multi-select mark |
c |
Clear all marks |
h / l or ← / → |
Collapse/expand tree (managed, unmanaged) |
d or Enter |
Load diff for selected file |
v |
Load file preview |
e |
Run edit on selected target (managed files only) |
Detail or log focus:
| Key | Behavior |
|---|---|
j / k or ↑ / ↓ |
Scroll |
PgUp / PgDn |
Page scroll |
Ctrl+u / Ctrl+d |
Half-page scroll |
Action menu:
| Key | Behavior |
|---|---|
| type text | Filter by action label |
↑ / ↓ |
Move |
Enter |
Execute |
Esc |
Close |
Implemented Actions
Action visibility is view-aware.
| View | Actions |
|---|---|
status |
apply, update, edit-config, edit-config-template, edit-ignore, re-add, merge, merge-all, edit, forget, chattr, purge |
managed |
apply, update, edit-config, edit-config-template, edit-ignore, edit, forget, chattr, destroy, purge |
unmanaged |
add, ignore, apply, update, edit-config, edit-config-template, edit-ignore, purge |
ignore opens a wizard with modes:
Auto(file: exact, directory:/**)Exact pathDirect children(/*)Recursive(/**)Global by name(example:**/.git/**)
Safety Model
- Strict confirmation is always required for dangerous actions:
destroy,purge. destroyandpurgerequire typed confirmation phrases.editis restricted to managed files.- Directory-wide
addis blocked to avoid accidental bulk imports. forgetandpurgerun with--force --no-ttyto avoid TUI deadlocks.- Interactive tools run in foreground (for example merge tool/editor flows).
Features
- 3-pane layout (List / Detail / Log)
- Rich diff rendering (hunk headers, line numbers, status-aware styling)
- File preview with extension-based syntax highlighting
- Tree navigation in
managedandunmanaged - Symlink-aware rendering and preview messages (directory link / broken link handling)
- Multi-select batch execution for selected-item actions
- Log auto-follow with manual scrolling
- Built-in safe defaults (no application config file)
Development
Contributing
Issues and pull requests are welcome. Please update README and tests together when behavior changes.
License
MIT (see package metadata in Cargo.toml).