Revdiff: Terminal Diff Viewer with Inline Annotations for AI Agents

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/
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
👀 See Also

RalphTerm: ralph-style loop for Claude Code with cross-review sessions from different agents
RalphTerm is an open-source Rust CLI that runs a ralph-style outer loop around Claude Code: it takes a markdown plan, executes tasks in fresh interactive sessions, and runs cross-review with a different model (e.g., Codex) in separate fresh sessions, feeding issues back into new implementer sessions.

Building a Local Open-Source AI Workspace with Rust and Tauri
Explore a fully local, open-source AI workspace built using Rust, Tauri, and sqlite-vec, without a Python backend.

Exploring API-to-API Interactions: A Closer Look at Automation
A recent discussion on Reddit delves into the intricacies of API-to-API phone calls, focusing on practical implementation and potential challenges using tools such as Postman and Twilio.

Am I OpenAI Compatible: Tool & Docs for Unified API Signatures
A new tool and documentation page documents OpenAI compatibility across open-source AI engines like vLLM and llama.cpp, including official and unofficial signatures.