lazychanges

command module
v0.0.0-...-73cfa01 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2026 License: MIT Imports: 25 Imported by: 0

README

lazychanges

Watch what your coding agents change, live, across every repository under the current directory — keep track of what you have already reviewed, and look back at what they committed.

Start it at the beginning of a working session and leave it open. The tree of modified, added, deleted and untracked files sits on the left, the diff of the selected file on the right; both refresh on their own while agents work.

  • One view for many repositories. Started in a meta-repository, a folder of clones or a repository with submodules, it shows every repository as a branch of the same tree.
  • What is not committed yet. Changes are measured from each repository's current HEAD: once the work is committed, it leaves the view for the history.
  • History across repositories. tab turns to the commits of every repository on one timeline, newest first: the latest 100, plus whatever is not pushed yet, marked ↑. Each commit unfolds into its files and their diff at that commit.
  • Review tracking. v marks a file as reviewed; it becomes unreviewed again as soon as its content changes, so after an agent's turn only what it touched needs reading again.
  • Read-only. It never writes the index and never takes index.lock, so it cannot get in the agents' way.

Install

go install github.com/thomasmhr/lazychanges@latest

Usage

lazychanges [dir]          # current directory by default
lazychanges --once [dir]   # plain-text list of the changes, no UI

lazychanges works out where it was started:

started in shows
a repository its changes; from a subdirectory, only that subdirectory
a monorepo (go.work, pnpm-workspace.yaml, package.json workspaces, …) the same, a subdirectory narrows the view to a package
a meta-repository the repository and the repositories it holds, ignored or untracked
a repository with submodules the repository and each submodule
a folder that is not a repository the repositories it holds, three levels deep

node_modules, vendor, tmp and other dependency or build directories are not searched. Repositories cloned or removed during the session show up within about thirty seconds.

Keys

key action
j k ↓ ↑, g G next, previous, first, last row
h l ← → fold or climb to the parent, unfold or enter
enter fold or unfold the repository or directory; on a file, read it whole
- + fold, unfold everything
v mark the file, or every file of the branch, as reviewed (again: unmark)
tab switch between the changes and the history; each keeps its selection
m M in the history, show more commits (200, 500) or fewer
space b, ctrl-d ctrl-u scroll the diff
n N next, previous hunk
w wrap long lines (on by default for .md and .txt)
esc clear the selection in the diff
q quit

The mouse wheel scrolls the list or the diff depending on the pane; a click selects a file or folds a directory.

A double click on a file, or enter, opens it whole over the screen, to read rather than review: as it is on disk, as it was in the commit in the history, or before its deletion. It scrolls with the wheel, j k, space b, g G; w wraps long lines; esc, q or a click on its ✕ closes it. It follows the file as it changes. Markdown is shown rendered, headings, lists, code and tables laid out; r switches to its source and back.

In the diff, drag to select text, double-click to select a word, triple-click a line; dragging above or below the pane scrolls it. The selection is copied to the clipboard as the button is released, without the +, - or space that starts each line of a diff, and with its tabs; esc clears it. The copy goes through the terminal (OSC 52), which Windows Terminal, iTerm2, kitty, WezTerm, Alacritty and foot accept; inside tmux, set -g set-clipboard on lets it through. To select with the terminal itself, hold shift while dragging.

Details

  • A file that just changed carries a ● for fifteen seconds; a reviewed file turns grey with a √, and the header counts how many are left.
  • Reviews last as long as the session, and are for the changes only.
  • The history follows the current branch of each repository and refreshes like the changes while it is shown. A commit is unpushed when it is on no remote-tracking branch; a repository without remotes marks none. A commit's date fades with its age: amber within the hour, then plain today, blue-grey yesterday, grey before.
  • Files over 2 MB are listed with their size; their diff is not loaded.
  • Control characters in a file are shown in caret notation (^M, ^[), never sent to the terminal.
  • Every git command runs with GIT_OPTIONAL_LOCKS=0. The view refreshes every two seconds, or every twice the duration of the last refresh when that is longer.

Development

go test ./...
go build -o ~/.local/bin/lazychanges .
vhs demo/demo.tape   # records demo/demo.gif; needs vhs, ttyd and ffmpeg

License

MIT

Documentation

Overview

lazychanges shows, live, what has been modified in the repository or repositories under the current directory, and the commits made in them. It only reads: no command touches the index or the work tree.

Jump to

Keyboard shortcuts

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