{"id":47737970,"url":"https://github.com/umputun/revdiff","last_synced_at":"2026-04-08T04:00:35.876Z","repository":{"id":348476124,"uuid":"1198207465","full_name":"umputun/revdiff","owner":"umputun","description":"TUI for reviewing diffs, files, and documents with inline annotations","archived":false,"fork":false,"pushed_at":"2026-04-07T02:24:52.000Z","size":5266,"stargazers_count":128,"open_issues_count":3,"forks_count":13,"subscribers_count":4,"default_branch":"master","last_synced_at":"2026-04-07T03:03:03.599Z","etag":null,"topics":["claude-code","code-review","diff"],"latest_commit_sha":null,"homepage":"https://revdiff.com","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/umputun.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["umputun"]}},"created_at":"2026-04-01T07:59:06.000Z","updated_at":"2026-04-07T02:58:05.000Z","dependencies_parsed_at":"2026-04-08T04:00:32.590Z","dependency_job_id":null,"html_url":"https://github.com/umputun/revdiff","commit_stats":null,"previous_names":["umputun/revdiff"],"tags_count":22,"template":false,"template_full_name":null,"purl":"pkg:github/umputun/revdiff","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umputun%2Frevdiff","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umputun%2Frevdiff/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umputun%2Frevdiff/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umputun%2Frevdiff/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/umputun","download_url":"https://codeload.github.com/umputun/revdiff/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umputun%2Frevdiff/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31539229,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T16:28:08.000Z","status":"online","status_checked_at":"2026-04-08T02:00:06.127Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["claude-code","code-review","diff"],"created_at":"2026-04-02T23:03:35.343Z","updated_at":"2026-04-08T04:00:35.806Z","avatar_url":"https://github.com/umputun.png","language":"Go","readme":"# revdiff [![Build Status](https://github.com/umputun/revdiff/actions/workflows/ci.yml/badge.svg)](https://github.com/umputun/revdiff/actions/workflows/ci.yml) [![Coverage Status](https://coveralls.io/repos/github/umputun/revdiff/badge.svg?branch=master)](https://coveralls.io/github/umputun/revdiff?branch=master) [![Go Report Card](https://goreportcard.com/badge/github.com/umputun/revdiff)](https://goreportcard.com/report/github.com/umputun/revdiff)\n\nLightweight TUI for reviewing git diffs with inline annotations. Outputs structured annotations to stdout on quit, making it easy to pipe results into AI agents, scripts, or other tools.\n\nBuilt for a specific use case: reviewing code changes without leaving a terminal-based AI coding session (e.g., Claude Code). Just enough UI to navigate a full-file diff, annotate specific lines, and return the results to the calling process - no more, no less.\n\n## Features\n\n- Structured annotation output to stdout - pipe into AI agents, scripts, or other tools\n- Full-file diff view with syntax highlighting\n- Collapsed diff mode: shows final text with change markers, toggle with `v`\n- Annotate any line in the diff (added, removed, or context) plus file-level notes\n- Two-pane TUI: file tree (left) + colorized diff viewport (right)\n- Hunk navigation to jump between change groups\n- Filter file tree to show only annotated files\n- Fully customizable colors via environment variables, CLI flags, or config file\n\n![revdiff screenshot](screenshot.png)\n\n## Requirements\n\n- `git` (used to generate diffs)\n\n## Installation\n\n**Homebrew (macOS/Linux):**\n\n```bash\nbrew install umputun/apps/revdiff\n```\n\n**Go install:**\n\n```bash\ngo install github.com/umputun/revdiff/cmd/revdiff@latest\n```\n\n**Binary releases:** download from [GitHub Releases](https://github.com/umputun/revdiff/releases) (deb, rpm, archives for linux/darwin amd64/arm64).\n\n## Claude Code Plugin\n\nrevdiff ships with a Claude Code plugin for interactive code review directly from a Claude session. The plugin launches revdiff as a terminal overlay, captures annotations, and feeds them back to Claude for processing.\n\nThe plugin requires one of the following terminals since Claude Code itself cannot display interactive TUI applications - the overlay runs revdiff in a separate terminal layer on top of the current session:\n\n| Terminal | Overlay method | Detection |\n|----------|---------------|-----------|\n| **tmux** | `display-popup` (blocks until quit) | `$TMUX` env var |\n| **kitty** | `kitty @ launch --type=overlay` | `$KITTY_LISTEN_ON` env var |\n| **wezterm** | `wezterm cli split-pane` | `$WEZTERM_PANE` env var |\n\nPriority: tmux → kitty → wezterm (first detected wins). If none are available, the plugin exits with an error.\n\n**Install:**\n\n```bash\n# add marketplace and install\n/plugin marketplace add umputun/revdiff\n/plugin install revdiff@umputun-revdiff\n```\n\n**Use with `/revdiff` command:**\n\n```\n/revdiff                  -- smart detection: uncommitted, last commit, or branch diff\n/revdiff HEAD~1           -- review last commit\n/revdiff main             -- review current branch against main\n/revdiff --staged         -- review staged changes only\n/revdiff HEAD~3           -- review last 3 commits\n```\n\n**Use with free text** (no slash command needed):\n\n```\n\"review diff\"                     -- smart detection, same as /revdiff\n\"review diff HEAD~1\"              -- last commit\n\"review diff against main\"        -- branch diff\n\"review changes from last 2 days\" -- Claude resolves the ref automatically\n\"revdiff for staged changes\"      -- staged only\n```\n\nWhen no ref is provided, the plugin detects what to review automatically:\n- On main/master with uncommitted changes — reviews uncommitted changes\n- On main/master with clean tree — reviews the last commit\n- On a feature branch with clean tree — reviews branch diff against main\n- On a feature branch with uncommitted changes — asks whether to review uncommitted only or the full branch diff\n\nThe plugin includes built-in reference documentation and can answer questions about revdiff usage, available themes, keybindings, and configuration options. It can also create or modify the local config file (`~/.config/revdiff/config`) on request:\n\n```\n\"what chroma themes does revdiff support?\"\n\"switch revdiff to dracula theme\"\n\"what are the revdiff keybindings?\"\n\"set tree width to 3 in revdiff config\"\n```\n\nThe plugin supports the full review loop: annotate → plan → fix → re-review until no more annotations remain.\n\n### Integration with Other Tools\n\nThe structured stdout output works with any tool that can read text:\n\n```bash\n# capture annotations for processing\nannotations=$(revdiff main)\nif [ -n \"$annotations\" ]; then\n  echo \"$annotations\" | your-tool\nfi\n```\n\n## Usage\n\n```\nrevdiff [OPTIONS] [ref]\n```\n\n### Options\n\n| Option | Description | Default |\n|--------|-------------|---------|\n| `ref` | Git ref to diff against | uncommitted changes |\n| `--staged` | Show staged changes, env: `REVDIFF_STAGED` | `false` |\n| `--tree-width` | File tree panel width in units (1-10), env: `REVDIFF_TREE_WIDTH` | `2` |\n| `--tab-width` | Number of spaces per tab character, env: `REVDIFF_TAB_WIDTH` | `4` |\n| `--no-colors` | Disable all colors including syntax highlighting, env: `REVDIFF_NO_COLORS` | `false` |\n| `--no-status-bar` | Hide the status bar, env: `REVDIFF_NO_STATUS_BAR` | `false` |\n| `--no-confirm-discard` | Skip confirmation when discarding annotations with Q, env: `REVDIFF_NO_CONFIRM_DISCARD` | `false` |\n| `--chroma-style` | Chroma color theme for syntax highlighting, env: `REVDIFF_CHROMA_STYLE` | `catppuccin-macchiato` |\n| `-o`, `--output` | Write annotations to file instead of stdout, env: `REVDIFF_OUTPUT` | |\n| `--config` | Path to config file, env: `REVDIFF_CONFIG` | `~/.config/revdiff/config` |\n| `--dump-config` | Print default config to stdout and exit | |\n| `-V`, `--version` | Show version info | |\n\n### Config File\n\nAll options can be set in a config file at `~/.config/revdiff/config` (INI format). CLI flags and environment variables override config file values.\n\nGenerate a default config file:\n\n```bash\nmkdir -p ~/.config/revdiff\nrevdiff --dump-config \u003e ~/.config/revdiff/config\n```\n\nThen uncomment and edit the values you want to change.\n\n\u003cdetails\u003e\n\u003csummary\u003eColor customization flags (click to expand)\u003c/summary\u003e\n\nAll color options accept hex values (`#rrggbb`) and have corresponding `REVDIFF_COLOR_*` env vars.\n\n| Option | Description | Default |\n|--------|-------------|---------|\n| `--color-accent` | Active pane borders and directory names | `#D5895F` |\n| `--color-border` | Inactive pane borders | `#585858` |\n| `--color-normal` | File entries and context lines | `#d0d0d0` |\n| `--color-muted` | Divider lines and status bar | `#6c6c6c` |\n| `--color-selected-fg` | Selected file text | `#ffffaf` |\n| `--color-selected-bg` | Selected file background | `#D5895F` |\n| `--color-annotation` | Annotation text and markers | `#ffd700` |\n| `--color-cursor-fg` | Cursor indicator color | `#bbbb44` |\n| `--color-cursor-bg` | Cursor indicator background | terminal default |\n| `--color-add-fg` | Added line text | `#87d787` |\n| `--color-add-bg` | Added line background | `#123800` |\n| `--color-remove-fg` | Removed line text | `#ff8787` |\n| `--color-remove-bg` | Removed line background | `#4D1100` |\n| `--color-modify-fg` | Modified line text (collapsed mode) | `#f5c542` |\n| `--color-modify-bg` | Modified line background (collapsed mode) | `#3D2E00` |\n| `--color-tree-bg` | File tree pane background | terminal default |\n| `--color-diff-bg` | Diff pane background | terminal default |\n| `--color-status-fg` | Status bar foreground | `#2D2D2D` |\n| `--color-status-bg` | Status bar background | `#C5794F` |\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eAvailable chroma styles (click to expand)\u003c/summary\u003e\n\n**Dark themes:** `aura-theme-dark`, `aura-theme-dark-soft`, `base16-snazzy`, `catppuccin-frappe`, `catppuccin-macchiato` (default), `catppuccin-mocha`, `doom-one`, `doom-one2`, `dracula`, `evergarden`, `fruity`, `github-dark`, `gruvbox`, `hrdark`, `monokai`, `modus-vivendi`, `native`, `nord`, `nordic`, `onedark`, `paraiso-dark`, `rose-pine`, `rose-pine-moon`, `rrt`, `solarized-dark`, `solarized-dark256`, `tokyonight-moon`, `tokyonight-night`, `tokyonight-storm`, `vim`, `vulcan`, `witchhazel`, `xcode-dark`\n\n**Light themes:** `autumn`, `borland`, `catppuccin-latte`, `colorful`, `emacs`, `friendly`, `github`, `gruvbox-light`, `igor`, `lovelace`, `manni`, `modus-operandi`, `monokailight`, `murphy`, `paraiso-light`, `pastie`, `perldoc`, `pygments`, `rainbow_dash`, `rose-pine-dawn`, `solarized-light`, `tango`, `tokyonight-day`, `trac`, `vs`, `xcode`\n\n**Other:** `RPGLE`, `abap`, `algol`, `algol_nu`, `arduino`, `ashen`, `average`, `bw`, `hr_high_contrast`, `onesenterprise`, `swapoff`\n\n\u003c/details\u003e\n\n### Examples\n\n```bash\n# review uncommitted changes\nrevdiff\n\n# review changes against a branch\nrevdiff main\n\n# review staged changes\nrevdiff --staged\n\n# review last commit\nrevdiff HEAD~1\n```\n\n### Key Bindings\n\n**Navigation:**\n\n| Key | Action |\n|-----|--------|\n| `j/k` or up/down | Navigate files (tree) / scroll diff (diff pane) |\n| `h/l` | Switch between file tree and diff pane |\n| left/right | Horizontal scroll in diff pane |\n| `Tab` | Switch between file tree and diff pane |\n| `PgDown/PgUp` | Page scroll in file tree and diff pane |\n| `Ctrl+d/Ctrl+u` | Page scroll in file tree and diff pane |\n| `Home/End` | Jump to first/last item |\n| `Enter` | Switch to diff pane (tree) / start annotation (diff pane) |\n| `n/p` | Next/previous changed file |\n| `[` / `]` | Jump to previous/next change hunk in diff |\n\n**Annotations:**\n\n| Key | Action |\n|-----|--------|\n| `a` or `Enter` (diff pane) | Annotate current diff line |\n| `A` | Add file-level annotation (stored at top of diff) |\n| `d` | Delete annotation under cursor |\n| `Esc` | Cancel annotation input |\n\n**View:**\n\n| Key | Action |\n|-----|--------|\n| `v` | Toggle collapsed diff mode (shows final text with change markers) |\n| `.` | Expand/collapse individual hunk under cursor (collapsed mode only) |\n| `f` | Toggle filter: all files / annotated only (shown when annotations exist) |\n| `q` | Quit, output annotations to stdout |\n| `Q` | Discard all annotations and quit (confirms if annotations exist) |\n\n### Output Format\n\n```\n## handler.go (file-level)\nconsider splitting this file into smaller modules\n\n## handler.go:43 (+)\nuse errors.Is() instead of direct comparison\n\n## store.go:18 (-)\ndon't remove this validation\n```\n\n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for details.\n\n## License\n\nMIT License - see [LICENSE](LICENSE) file for details.\n","funding_links":["https://github.com/sponsors/umputun"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fumputun%2Frevdiff","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fumputun%2Frevdiff","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fumputun%2Frevdiff/lists"}