Using archr

Reviews

Reviewing the working tree, a commit or a range, with whole files and their annotations in view.

In a git repository archr is always in a review. It is WORKTREE, the ongoing review of uncommitted work, unless a spec says otherwise. A review of the working tree follows files as they change, as an agent writes them.

Spec Reviews
WORKTREE Uncommitted changes against HEAD
A commit That commit against its parent
a..b From a to b, where b can be WORKTREE

R lists the reviews to switch to: the working tree, the other open reviews, and recent commits.

A review, from its first change to a comment's thread

What is shown

A review shows the whole project, not only the diff. Folders with something changed in them start open, but for those already reviewed, and f shows only the changed files, or everything. archr opens on the first change in a file not yet reviewed.

A file the review changed is marked at the left of its name: A added, M modified, D deleted or R renamed. A deleted name is struck through, and a renamed file's header shows where it was. A folder is marked A or D when everything in it was added or deleted. The status bar shows the lines added and removed in what is highlighted, and all files when the tree is showing everything.

A change to an annotation is shown on the code it is about, never as a file under .archr/.

Reading a change

  • Added and changed lines are on a green tint, and removed lines show where they were on a red one.
  • Both keep their syntax colours, with the words that changed on a stronger tint.
  • A removed line is matched with the line it became by what the two share, not by where it is in the change.
  • A line too long to compare word by word, as a generated file's often is, is shown removed and added, with no words marked.
  • In a terminal that does not report its background there are no tints: removed lines are red, and the words that changed are reversed.
  • A dim @@ line names the function a change is in when that is out of sight, once for the changes that follow in it.
  • Unchanged runs fold to ⋯ N lines, with three lines kept around each change.
  • Enter opens a fold, or else goes to the next change.
  • The cursor stays beside the change it came from: on the fold's first line when it came down onto the fold, else on its last.
  • u unfolds or folds the file in view, and no other.
  • o shows the file as it was before the change, and again as it is. It keeps the same folds and the same place, with the lines the change took away marked −, the line numbers red and before in the file's header.
  • A change to line endings alone is left out of the lines, and the file's header says what they are now, as line endings now LF.
  • w leaves whitespace-only changes out, line endings among them, and puts them back.

The cursor steps onto removed lines too, and a comment there is on the file as it was.

The change, the annotation it breaks, and a comment on it, in one view
The change, the annotation it breaks, and a comment on it, in one view

A folder's changes

A folder's row shows every change under it as one scroll, with a header above each file. The files are in the tree's order.

  • ]f moves between files and ]h between all their changes.
  • The status bar shows the folder with how far through its changed lines the cursor is, as 38%, and then the file the cursor is in.
  • The tree marks that file's row, and scrolls to keep it in sight.
  • A collapsed file's lines are not counted.
  • z collapses the file the cursor is in.
  • Files the project's settings call generated start collapsed.
  • A commit or range review lists its commits' messages above the changes.

As git's pager

archr pager reads what git would send to a pager, so git diff and git show open in archr.

git config --global core.pager "archr pager"
  • One commit's patch, as git show gives, opens as the review of that commit.
  • Any other patch, as git diff or git diff --cached gives, is shown as a read-only review: no comments and no marks. The status bar says READ ONLY, which flashes when a key that writes is pressed, and ? leaves those keys out. w is left out too: git diff -w gives that patch.
  • What is not a patch, or is several commits as git log -p gives, goes to $PAGER, else less.

The tree starts hidden, and t shows it. To try it for one command, git -c core.pager="archr pager" diff.

Marking files reviewed

r marks a file, or everything in a folder, reviewed. Its letter becomes ✓, and a folder shows ✓ once everything in it is reviewed. In the view it marks the file and opens the next one not yet reviewed.

In the working tree a mark remembers the file's contents. When the file changes again its ✓ becomes ~, without a keypress, and r marks it afresh.

Closing a review

Once every comment in a review is closed, archr offers to close the review. Z in the list closes it at any time, offering to keep the comments not closed as annotations.

A closed review is kept, read-only, as its spec with @ and when it closed. Its status bar says READ ONLY, which flashes when a key that writes is pressed, and ? leaves those keys out. archr WORKTREE@2026-10-29T23:40:00 opens one, and the next review of its spec starts fresh. archr purge deletes the closed ones.

An agent can close a comment or a review too. If archr is open on a review an agent closes, it starts afresh and says who closed it.