How to view your agent's git diff in the browser before commit (with Diffle)

To see the git diff of your agent in the browser before commit, run diffle working in the repository. Diffle opens all changes (staged, unstaged, and new files) in a tab you navigate with the keyboard alone, with go-to-definition and types right within the diff. When you’re done, a shortcut copies all your comments as a prompt ready to paste back to your agent.

We tested it before writing this note: version 0.2.4 on Linux, on a small Python repository with pyrefly as language server. We recorded the complete cycle: walking through the diff, inspecting a function, jumping to its definition, leaving a comment, and exporting it. That’s what you see in this video.

What is Diffle?

Diffle is an open-source diff viewer that reviews your Git changes locally, in the browser. Moritz Wilksch published it under the Apache-2.0 license and introduced it on Hacker News on October 8, 2026. It does three things a normal git diff doesn’t:

  • You navigate it with vim-style shortcuts, without touching the mouse.
  • It talks to a language server, so you can go to definition and see types while reviewing.
  • It turns your review into something useful: a prompt for your agent or a pending review on a GitHub pull request.

Everything runs on your machine. Diffle starts a local server, opens a tab, and stops when you close it, printing any open comments to the terminal.

The author credits difit as inspiration, and the diff is rendered with the @pierre/diffs library.

How do you install Diffle?

There are several ways. The standalone binary is the only one that doesn’t need any runtime.

# Standalone binary (Linux x64/arm64 with glibc, macOS with Apple silicon), no Node.js
curl -fsSL https://diffle.app/install.sh | sh

# npm (requires Node.js 24 or later)
npm install -g @moritzwilksch/diffle

# conda-forge
pixi global install diffle

The binary installs to ~/.local/bin. To try it without installing anything:

npx @moritzwilksch/diffle working

Watch out with npm: the package declares Node.js 24 as the minimum version. If you’re on an older LTS, install the binary.

Does it work on Windows?

Yes. There’s an installation script for Windows on x64 and arm64, run from PowerShell:

irm https://diffle.app/install.ps1 | iex

How do you see the git diff in the browser before commit?

Run diffle working from the repository. It compares HEAD with your working tree, including staged changes, unstaged changes, and untracked files, so you see both what the agent edited and what it created from scratch.

To compare code between other revisions, use the same git diff syntax you already know:

diffle develop        # what this branch added since it split from develop
diffle show a1b2c3d   # a single commit, like git show
diffle main..feat     # any git diff revspec
diffle range-diff main..v1 main..v2   # how a series of commits was rewritten

With the tab open, the keyboard does the work:

Key Action
j / k next / previous line (10j scrolls down ten lines)
J / K next / previous file
] / [ next / previous hunk
c comment the line
C comment the entire file
V select a block
v mark the file as reviewed
/ / g/ search in this file / in all modified files
? full list of shortcuts

Comments are saved in <git-dir>/diffle/ and never touch your working tree. They follow their text as the code changes and become obsolete when that text leaves the diff.

How do you go to definition within a diff?

Diffle starts a language server for each language in the diff, provided it finds one in your PATH. That gives you editor-like navigation without leaving the review:

Key Action
gd (or Ctrl/Cmd + click) go to definition
gy go to type definition
gA references
gs / gS symbols in file / in repository
gh hover: types and documentation
w / b navigate symbols on a line
Ctrl+o go back

In our test, the agent’s change added a call to apply_discount() in cart.py. With gh on it we saw the function signature and docstring that pyrefly provided. With gd it opened prices.py, a file not in the diff, right at the definition, and Ctrl+o brought us back to the review. That’s the real win over a terminal pager: you check what a call does without switching to the editor. Results outside the diff open in read-only mode.

To see which server handles each language:

diffle lsp

You can change it or disable it per language:

diffle config set-lsp rust "rust-analyzer"   # persistent
diffle working --lsp python="pyrefly lsp"    # only this run
diffle working --no-lsp                      # no language server

One detail before enabling it: language servers run through a shell inside the repository and can read anything your user can read. In a repository you don’t trust, use --no-lsp.

How do you send the review back to your agent?

Press yy. Diffle copies all open comments, each with its file, line, and the code it refers to, in a format ready to paste into Claude Code, Codex, Cursor, or any other agent. Here’s what our single comment produced:

store/cart.py:21

>             return apply_discount(subtotal, self.coupon)

If the coupon is 100, the total ends up at 0. Is that intentional? Add a test for that case.

The agent gets the exact location and context, not a vague “check the discount logic.” That’s the cycle Diffle is built for: the agent writes, you review with real code navigation, and the review comes back as a precise instruction.

If you’re interested in another way to review what an agent does, we also cover Open Code Review.

Can it review GitHub pull requests?

Yes. diffle pr 27, or diffle pr with no number for the pull request of the current branch, opens the PR for review. The pull request icon adds a thread, or all of them, to a pending review on GitHub. Diffle never sends the review on its own: you edit, discard, and submit the comments on GitHub.

It needs a token, which it takes in this order from GITHUB_TOKEN, from GH_TOKEN, or from a session logged into the gh CLI. Export only works when the comparison matches the PR’s committed diff, so unpushed commits and working tree changes disable it.

We didn’t test the GitHub flow: what’s described in this section comes from the project README.

Is it ready to use daily?

It’s early and moving fast. At the time of publishing this note (October 12, 2026), the latest version is 0.2.4, released on npm on October 7, with 17 versions since the first, on September 8. Expect changes in shortcuts and options between versions: take this article as a snapshot of 0.2.4 and check the README for what changed after.

That said, the main cycle worked smoothly in our test: install, diffle working, review with the language server, yy, and paste.


What about you? How do you review your agent’s changes before committing?

Where do you review code your agent wrote?
  • With git diff in the terminal
  • In my editor’s diff view
  • In the GitHub PR after pushing it
  • I prefer another option (tell us which)
0 votantes

Comment below or, if this article reached you by email, reply directly to the email: your reply will be published here.

Related: Whiteboard: How to review code your AI agent writes with sequence diagrams