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

Commitment Issues: A Tool That Analyzes and 'Buries' Unfinished GitHub Repos
Tools

Commitment Issues: A Tool That Analyzes and 'Buries' Unfinished GitHub Repos

A developer built a tool called Commitment Issues that analyzes GitHub repositories to determine if they're abandoned, generates a 'death certificate,' and extracts the final commit message as 'last words.' The tool uses heuristics like commit frequency, last activity, and stars vs momentum, and was prototyped using Claude.

OpenClawRadar
Drop-in OAuth Provider for Personal FastMCP Servers on All Claude Platforms
Tools

Drop-in OAuth Provider for Personal FastMCP Servers on All Claude Platforms

A developer created a single-file Python OAuth provider that enables personal FastMCP servers to work on Claude.ai web, mobile, and Desktop platforms without requiring external identity services like Auth0 or Google.

OpenClawRadar
Open Source Dashboard Reveals Actual Claude Code Compute Costs
Tools

Open Source Dashboard Reveals Actual Claude Code Compute Costs

A developer reverse-engineered Claude Code's rate limit formula to build a local dashboard that shows real-time usage percentage, actual dollar costs, burn rate, peak hours, and which skills/hooks are firing. The tool revealed a $100/month plan consumed $13,286 in equivalent API compute in one month.

OpenClawRadar
Hawkeye Update Adds Swarm Orchestration, Remote Tasks, and Local Model Support
Tools

Hawkeye Update Adds Swarm Orchestration, Remote Tasks, and Local Model Support

Hawkeye v1.0+ now supports multi-agent swarm orchestration, remote task queuing, and improved Ollama/LM Studio integration. The local-first AI agent flight recorder helps developers track what happens when agents work in repositories.

OpenClawRadar