lazychez

command module
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 29, 2026 License: MIT Imports: 6 Imported by: 0

README

lazychez

lazygit, but for your dotfiles.

Your .zshrc is on three machines and none of them match. Sound familiar? chezmoi solves this — it's a dotfile manager that tracks your config files in a git repo and applies them consistently across every machine you touch. It's powerful, well-designed, and entirely CLI-driven.

lazychez gives chezmoi a proper terminal UI. Browse your managed files, see what's changed, view diffs, add or apply changes, and push it all to git — without stringing together five commands from memory.

lazychez demo

Why lazychez

  • See changes instantly — chezmoi status codes show exactly what diverged, at a glance
  • Inline diffs — syntax-highlighted, scrollable, right there in your terminal
  • Template preview — press t on any .tmpl file to see its rendered output for this machine (chezmoi cat)
  • Full git workflow built in — stage, commit, push, pull without switching tools
  • Fuzzy file picker — add unmanaged files to chezmoi without typing paths
  • Fuzzy file filter — type / to narrow the file list instantly, lock the filter with Enter, work on just the matches
  • Forget files — remove files from chezmoi management when you're done with them
  • Responsive layout — side-by-side on wide terminals, stacked on narrow ones
  • Vim-style navigation — btw

Install

Homebrew
brew tap nickrotondo/tap
brew install lazychez
Go
go install github.com/nickrotondo/lazychez@latest
From source
git clone https://github.com/nickrotondo/lazychez.git
cd lazychez
go build
./lazychez

Prerequisites

  • chezmoi installed and initialized (chezmoi init)
  • Git
  • A git remote configured in your chezmoi source directory (needed for push/pull — see chezmoi quick start)

Usage

Run lazychez from anywhere — it automatically finds your chezmoi source directory.

[!TIP] Alias it to something short like lc or chez. Your future self will thank you.

Layout

The UI has four panes:

Pane What it shows
[1] Chezmoi Status All chezmoi-managed files with status codes; .tmpl files labeled in teal
[2] Git Git status of your chezmoi source directory
[3] Remote Branch tracking info — ahead/behind commit counts
[0] Detail chezmoi diff, chezmoi cat, or git diff for the selected file

Wide terminals (≥85 columns) get a side-by-side layout — file list, git status, and remote info on the left, detail pane on the right. Narrow terminals stack everything vertically.

How it works

lazychez wraps the chezmoi and git CLIs under the hood. It calls chezmoi managed, chezmoi status, and git status to populate the panes, then delegates to chezmoi add, chezmoi apply, git commit, etc. for every operation.

Status codes are chezmoi's native two-character format (XY), shown inline next to each file:

  • Column 1 — what chezmoi add would change in source (M, A, D, or space)
  • Column 2 — what chezmoi apply would change in destination (M, A, D, or space)
Keybindings
Navigation
Key Action
j / k Move down / up
g / G Jump to top / bottom
Ctrl+d / Ctrl+u Half-page down / up
H / L Previous / next pane
Tab / Shift+Tab Next / previous pane
/ Cycle between file list and git
03 Jump to pane
Esc Back from diff pane
Chezmoi pane
Key Action
s Re-add file (destination → source)
a Apply file (source → destination)
A Apply all files
t Toggle template preview (chezmoi cat) — .tmpl files only
e Edit source (chezmoi edit)
+ Add unmanaged file (fuzzy file picker)
x Forget file (remove from chezmoi)
/ Filter files (fuzzy search)
Enter Lock filter (work on filtered matches)
Esc Cancel / exit filter

After re-add, the status bar shows an undo hint directing you to the Git pane.

Press t on a template file to see its rendered output for the current machine. Navigate to a different file to return to diff view.

Git pane
Key Action
Space Stage / unstage file
a Stage all files
c Commit (opens message input)
p Pull from remote
P Push to remote
D Discard changes (with confirmation)
General
Key Action
r Refresh all panes
C Edit chezmoi config
? Toggle help overlay
q Quit

Built with


Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
git
ui

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL