Revdiff: Terminal Diff Viewer with Inline Annotations for AI Agents

✍️ OpenClawRadar📅 Published: April 16, 2026🔗 Source
Revdiff: Terminal Diff Viewer with Inline Annotations for AI Agents
Ad

What Revdiff Does

Revdiff is a terminal user interface (TUI) diff viewer designed for a specific workflow: reviewing AI-generated code changes without leaving the terminal session where the AI agent runs. The tool allows you to annotate lines, hunks, or files and feed those annotations straight back to the AI agent for processing.

Core Workflow

From a Claude Code session, you can type /revdiff main or say "review diff for last 3 commits" to open revdiff as a terminal overlay on top of the agent session. After reading the diff and dropping annotations, you quit, and the annotations go straight back to the agent. When the agent finishes making changes, revdiff reopens on the new changes automatically, creating a continuous loop until you quit without leaving annotations.

Planning Integration

A separate revdiff-planning plugin hooks into Claude Code's plan mode. When the agent finishes a plan and calls ExitPlanMode, revdiff opens automatically on the plan text. You can annotate parts you disagree with or want expanded, quit, and the agent revises the plan before writing any code.

Key Features

  • Two-pane TUI: file tree on the left, syntax-highlighted diff on the right
  • Vim-style navigation with /search, hunk jumping, and word-level change highlighting
  • Blame gutters showing author name and commit age per line
  • Collapsed diff mode showing final text with change markers
  • Word wrap mode with continuation markers
  • Horizontal scroll overflow indicators with « / » markers
  • Line numbers with side-by-side old/new gutters for diffs
  • Mercurial support with auto-detection and git-style ref translation
  • Single-file auto-detection that hides tree pane for full-width diff view
  • Annotation list popup to browse all annotations across files
  • Status line with filename, diff stats, hunk position, and mode indicators
  • Help overlay showing all keybindings organized by section
  • Markdown TOC navigation for single-file markdown files
  • All-files mode to browse and annotate all git-tracked files
  • No-git file review for files outside repositories
  • Scratch-buffer review for arbitrary piped or redirected text
  • Review history auto-saved to ~/.config/revdiff/history/
Ad

Customization

Revdiff offers 7 bundled color themes, remappable keybindings, and per-color overrides via CLI flags, environment variables, or config file. You can export default keybindings with --dump-keys.

Installation and Usage

Install via Homebrew: brew install umputun/apps/revdiff. The tool is a single binary - just run revdiff HEAD~3 to review your last 3 commits. It works with git and Mercurial repositories.

Plugin Support

Ready-to-use plugins are available for Claude Code (terminal overlay via tmux, Zellij, kitty, wezterm, Kaku, cmux, ghostty, iTerm2, or Emacs vterm), Codex, and pi. The Claude Code plugin requires one of the supported terminals since Claude Code itself cannot display interactive TUI applications.

Technical Details

Written in Go and open source under MIT license. Requires git or hg for generating diffs (optional when using --only or --stdin).

📖 Read the full source: HN AI Agents

Ad

👀 See Also