Home / Blog / Diffreview – code review for local Claude diffs
Tech News

Diffreview – code review for local Claude diffs

The project provides a native desktop interface that bridges local git diffs with autonomous coding agents through formatted terminal communication.

By Dillip Chowdary • Nov 02, 2026 • Source: github.com

Diffreview – code review for local Claude diffs

Open-source developer chalmagean released diffreview, a native macOS utility designed to review local git changes in a GitHub pull request interface and send structured markdown feedback to Claude Code. Released under the open-source MIT license, the tool compiles using the Swift 6 toolchain and runs on macOS 14 or later. According to github.com's report, the utility launches inside any git repository, renders diffs in an AppKit and SwiftUI window, and emits reviews to standard output upon submission.

This report details the architecture, workflow mechanics, git inspection modes, and agent integration points of the new utility. Software engineers using command-line coding assistants, repository maintainers reviewing branch changes, and developers seeking structured peer-review interfaces before committing code can evaluate how diffreview operates across local development environments.

Diffreview – code review for local Claude: what actually changed

The project provides a native desktop interface that bridges local git diffs with autonomous coding agents through formatted terminal communication. Instead of reviewing raw command-line patches or pushing uncommitted branches to GitHub, developers launch an AppKit and SwiftUI window directly from their repository. The interface displays modified files alongside line numbers, automatically collapsing files exceeding 1,500 changed lines. Reviewers leave inline notes on single lines, select multi-line spans, post file-wide remarks in headers, and compose summary notes. Clicking Submit review writes markdown feedback to standard output and exits with code 0.

Process exit codes communicate review status directly to automated terminal tools. Closing the window or aborting a review triggers exit code 1 while emitting no text to standard output, signaling that the process stopped without feedback. If launched in a repository without detectable changes, the binary prints an explanation to standard error and exits with code 1. When executed outside a git tree, given an invalid git reference, or supplied invalid arguments, the tool outputs an error to standard error and exits with code 2. This signaling ensures agents do not execute aborted instructions.

Diffreview – code review for local Claude: how it works

Diffreview – code review for local Claude diffs
Illustration · Pexels

Execution begins by calling the binary with or without targeting parameters to establish the comparison baseline. Running diffreview without arguments captures uncommitted working tree edits, parsing git diff HEAD alongside untracked files. Adding the parameter --base followed by a branch name such as main compares committed branch work against the merge-base ancestor, ignoring unstaged changes. Navigation relies on dedicated shortcuts: clicking a line opens an inline comment field, Shift-clicking expands comments across multi-line ranges, Command-Return adds the comment, Escape cancels, and Command-Shift-Return opens the final review summary and submission button.

Draft comments save automatically to .git/diffreview/comments.json, preventing data loss when closing the window. Subsequent launches automatically reload stored review drafts, and text inside an open comment box is preserved even if the window closes mid-entry. Submitting the review deletes the JSON draft file from disk. The output formats top-level notes under a Code Review heading, separates individual files beneath second-level path headers, labels selected line ranges using new or old indicators, and packages mixed additions and deletions into fenced diff blocks.

Advertisement

Tech Pulse Daily

Get tomorrow's pulse first

Join engineers who read Tech Pulse before stand-up. Free, weekday mornings.

Diffreview – code review for local Claude: why it matters now

The utility solves review friction in terminal-based development cycles powered by generative programming assistants. When coding agents generate modifications across multiple files, developers struggle to inspect and annotate changes using raw terminal diffs alone. By integrating directly with Claude Code through a custom slash command definition, diffreview creates an interactive review barrier. The repository ships a command configuration file at .claude/commands/diffreview.md for installation into ~/.claude/commands. Running /diffreview launches the graphical window, pauses the assistant until the inspection finishes, and returns structured markdown comments for the model to address.

Accommodating human review pacing requires adjusting the execution environment where Claude Code runs shell subprocesses. By default, the Claude Code Bash tool enforces a two-minute timeout, which is insufficient for detailed multi-file reviews. To prevent premature command timeouts during inspection, developers must update ~/.claude/settings.json, setting BASH_DEFAULT_TIMEOUT_MS and BASH_MAX_TIMEOUT_MS to 3600000. This extends the shell timeout to one full hour across all Bash commands. The integrated command instructs Claude Code to address each review comment and ask clarifying questions before changing files.

Diffreview – code review for local Claude: who is affected

The tool targets developers on Apple hardware running macOS 14 or later. Compiling the project from source requires the Swift 6 toolchain, available through Xcode or Command Line Tools, along with git installed on PATH. Building requires cloning the repository, running swift build with release flags, and copying the executable to ~/.local/bin or another PATH location. Because diffreview functions as a local binary without external network services, engineers working on proprietary codebases or isolated offline systems can review modifications without transmitting sensitive diffs to external cloud platforms.

Developers on Linux and Windows platforms remain unsupported because the interface relies directly on native AppKit and SwiftUI frameworks. Teams managing extensive pull requests benefit immediately from automatic collapsing on files with more than 1,500 changed lines, which keeps navigation responsive. Developers reviewing isolated branch commits can supply the --base argument to audit committed work against upstream branches like main without including unstaged local changes. This makes the utility practical both for local coding agent iteration and for pre-submission pull request audits.

Diffreview – code review for local Claude: what to watch

Contributors modifying the codebase must observe specific testing requirements and module divisions detailed in the repository. The project divides source code into three directories: Sources/DiffReviewCore handles git execution, unified diff parsing, comment models, and markdown generation; Sources/diffreview manages the AppKit and SwiftUI user interface; and Tests/DiffReviewCoreTests hosts unit and integration tests. Developers must run scripts/test.sh rather than swift test. In environments with Command Line Tools and no Xcode installation, swift test builds the suite but executes zero tests while reporting success; the runner script detects this setup and runs tests via scripts/TestRunner.swift.

The roadmap includes several implementation limits that developers should watch as development progresses. The unified diff parser in DiffReviewCore already processes renames, file copies, binary files, file mode updates, quoted paths, and missing newline markers at file ends. However, syntax highlighting is not yet supported in the diff viewer. The codebase designates Sources/diffreview/SyntaxHighlighter.swift as the designated integration file where syntax coloring can be added through its highlight method. Future updates that introduce syntax highlighting will improve visual scanning without altering markdown export semantics.

Developer Action Items

  • ☐ Diff the official changelog for Claude / GitHub / macOS before you bump — APIs, defaults, and removed flags only.
  • ☐ Install through the vendor's documented channel in staging; keep a one-command rollback and time-box the canary.
  • ☐ Grep your repo for old flag names, lockfile pins, and plugin versions that the notes mark as breaking.
  • ☐ Prefer the first patch cut over the day-zero tag unless you have a reason to be on the leading edge.
  • ☐ If HN Claude/Codex/Fable did not name a region, plan, or SKU, screenshot the official availability line before you promise it to users.

Diffreview – code review for local Claude FAQ

What operating systems and tools are required to run diffreview?

Diffreview requires macOS 14 or later, the Swift 6 toolchain from Xcode or Command Line Tools, and git on the system PATH.

How does diffreview handle uncommitted work versus branch commits?

Running diffreview without arguments reviews uncommitted changes and untracked files, while diffreview --base main compares committed branch work against the merge-base ancestor without unstaged changes.

Are review drafts lost if the window closes accidentally?

No, drafts save automatically to .git/diffreview/comments.json and reload upon subsequent launches, with the file deleted only when the review is submitted.

Why must developers adjust Claude Code timeout settings for diffreview?

The default Claude Code Bash timeout is two minutes, which is too brief for code reviews, so users should set BASH_DEFAULT_TIMEOUT_MS and BASH_MAX_TIMEOUT_MS to 3600000 in ~/.claude/settings.json.

Sources

Dillip Chowdary

Author

Dillip Chowdary

Writes Tech Bytes coverage of AI, engineering, and the tools that actually ship. Editor of Tech Pulse Daily.

Related on Tech Bytes

Advertisement

5-min tech signal

Weekday briefing for engineers who skip the noise.

No spam · Unsubscribe anytime

Advertisement

✈️ CareerPilot

Your AI job-search copilot

Match your resume against live Ashby, Greenhouse & Lever openings — fit scores, job-specific resume optimization and email alerts.

Find matching jobs →

Free Tools

Browse all tools →