# Diffler

> Terminal code review for AI coding agents. Live diffs, comments the agent answers, PR review, MCP built in.

- **Type:** MCP server
- **Install:** `agentstack add mcp-matheusfillipe-diffler`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [matheusfillipe](https://agentstack.voostack.com/s/matheusfillipe)
- **Installs:** 0
- **Category:** [Integrations](https://agentstack.voostack.com/c/integrations)
- **Latest version:** 0.1.0
- **License:** Apache-2.0
- **Upstream author:** [matheusfillipe](https://github.com/matheusfillipe)
- **Source:** https://github.com/matheusfillipe/diffler

## Install

```sh
agentstack add mcp-matheusfillipe-diffler
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# diffler

[](https://crates.io/crates/diffler)
[](https://www.npmjs.com/package/@mattfillipe/diffler)
[](https://chat.h4ks.com)

A tool for taking ownership of agentic code: review what your agent writes,
together with the agent, while it happens. The code that lands is code you
have actually reviewed.

If you know Emacs' [magit](https://magit.vc), diffler is basically a
standalone magit with an MCP server built in: the same fast, keyboard-driven
git UI, no Emacs required. The keys follow the
[Doom Emacs](https://github.com/doomemacs/doomemacs) magit experience, so its
leader-key transients land where your fingers expect them. Launch it in a repo
alongside Claude Code or any MCP-compatible agent: it shows a live diff of what
the agent is doing; you read, comment, stage, and commit; the agent picks your
feedback up over MCP and responds in place. One binary, no browser, no daemon.

## Install

```sh
cargo install diffler
```

Prebuilt binary

Skips the compile, and needs no Rust toolchain.

```sh
cargo binstall diffler
```

Or download it straight from the
[releases page](https://github.com/matheusfillipe/diffler/releases): macOS,
Linux and Windows, x86_64 and arm64. Any GitHub-release installer (`eget`,
`ubi`, ...) works against it too.

Homebrew

macOS and Linux. The tap is this repository.

```sh
brew tap matheusfillipe/diffler https://github.com/matheusfillipe/diffler
brew install diffler
```

Scoop

Windows. The bucket is this repository.

```sh
scoop bucket add diffler https://github.com/matheusfillipe/diffler
scoop install diffler
```

Arch

`diffler-bin` on the AUR ships the prebuilt binary, so it installs without
building.

```sh
yay -S diffler-bin
```

Nix

The flake serves the prebuilt binary. `nix run` tries it without installing
anything, `nix profile install` keeps it.

```sh
nix run github:matheusfillipe/diffler
nix profile install github:matheusfillipe/diffler
```

npm

A wrapper that fetches the prebuilt binary. The package name is scoped, the
command it installs is plain `diffler`.

```sh
npx @mattfillipe/diffler
npm install -g @mattfillipe/diffler
```

## Quickstart

Run `diffler` inside a repository. It starts the TUI and an MCP server on
port 8417. Connect your agent once:

Claude Code

```sh
claude mcp add --transport http diffler http://127.0.0.1:8417/mcp
# or, over stdio, auto-discovering the port:
claude mcp add diffler -- npx -y diffler-mcp
# or, as a plugin (MCP server plus the /df, /dfa and /dfr commands):
claude plugin marketplace add matheusfillipe/diffler && claude plugin install diffler@diffler
```

Connected, the server's prompts show up as `/diffler:review`,
`/diffler:walkthrough` and `/diffler:critique`. The plugin adds `/df`, to
answer your comments, `/dfa`, to walk you through a change, and `/dfr`, to
review a change and leave comments.

opencode

Add the server to `opencode.json` in the project, or globally in
`~/.config/opencode/opencode.json`:

```json
{
  "mcp": {
    "diffler": {
      "type": "local",
      "command": ["npx", "-y", "diffler-mcp"],
      "enabled": true
    }
  }
}
```

And install the `/df`, `/dfa` and `/dfr` commands (opencode has no package
mechanism for commands, so this fetches the ones maintained in this repo):

```sh
mkdir -p ~/.config/opencode/commands
for c in df dfa dfr; do curl -fsSLo ~/.config/opencode/commands/$c.md \
  https://raw.githubusercontent.com/matheusfillipe/diffler/main/.opencode/commands/$c.md; done
```

Any other MCP agent

Point it at `http://127.0.0.1:8417/mcp` (streamable HTTP), or run
`npx -y diffler-mcp` as a stdio proxy that auto-discovers the port from
`.diffler/mcp.json`. The server also ships `review`, `walkthrough` and
`critique` prompts that prompt-aware clients surface as commands.

The loop: the agent edits files, the diff updates live. You comment lines or
ranges in the diff view and press `Z` to send feedback. The agent picks the
comments up through `wait_for_feedback`, replies or proposes resolutions, and
you confirm in the TUI. `y`/`Y` copy the same feedback as markdown if you would
rather paste it into a prompt.

Ask the agent to walk you through what it changed and it publishes a
walkthrough: a summary, then one stop per decision, in reading order, each
anchored to the code it is about. The status screen lists every walkthrough the
repository has, and `` opens one. See
[docs/walkthroughs.md](docs/walkthroughs.md).

The same review works against real pull requests: the status screen shows the
branch's PR (and `b` `p` lists all open ones; reviewing never needs a
checkout). PR comments sync in as regular threads, yours stack locally, and
`S` submits them as a single review on the forge. `b` `P` opens a new one from
the current branch, filling the title and body from its commits and pushing
first when the forge has not seen the branch yet. Replies the agent wrote stay
local: what goes out carries your name, so it is what you wrote.

## Keys

Vim-like: `j`/`k`/`gg`/`G` motions, `/` search, and
``/`` paging work in every list. The basics:

| Key | Action |
| --- | --- |
| `` | command palette: fuzzy-find every action on this screen and its key |
| `` | open the thing under the cursor |
| `s` / `u` | stage / unstage |
| `cc` | commit |
| `c` | comment the diff line (`V` selects a range first) |
| `m` / `u` / `U` | in the diff view: mark the file viewed and step to the row under it, sorting it to the top of its group (a folder row marks everything under it) / jump to the next unviewed / clear every mark |
| `+` / `-` / `=` | widen / narrow the context around a hunk, or open the whole file |
| `\|` | side-by-side diff |
| `t` | cycle the sidebar: file tree, review buckets (viewed files fold away, come back if they change), kinds (source, tests, docs, config, build, generated, assets), and the walkthrough when the review has one |
| `V` | select a range: lines in the diff, rows anywhere else, or a run of commits on the status screen, which `` then reviews as one combined diff |
| `o` | open the figure under the cursor as a full-screen graph you walk node by node |
| `Z` | send feedback to the agent |
| `C` | comments sidebar: walk every comment, Enter jumps to it in the pane; `t` groups by file, author, or status (resolved folds away), or lists them flat |
| `d` / `D` | delete the comment under the cursor / every local comment of the review |
| `S` | submit stacked PR comments as one review |
| `b` `P` | open a pull request for the current branch |
| `d` | review the working tree against something else: `d` base branch, `c` last commit, `b` a branch, `s` a commit, `w` HEAD |
| `y` / `Y` | copy feedback as markdown (file / all) |
| `y` | on a status or PR-list row, copy what it points at: a pull request as its URL, a commit as its sha, a file or folder as its repo-relative path |
| `gf` | find any tracked file: Enter opens it, `b` blames it, `e` sends it to `$EDITOR` |
| `B` | blame the file under the cursor, at that line (`b` toggles the column, `` reviews the commit) |
| `L` | language breakdown of the repo: files, lines, code, comments per language (`s` sorts) |
| `e` | open the file in `$EDITOR` |
| `?` | full keymap for the current screen |
| `q` | back / quit |

Every binding is remappable, see
[docs/config.example.toml](docs/config.example.toml).

The diff view is two panes: a file sidebar and the selected file's diff. `h`
and `l` (or the left/right arrows) focus the sidebar and the diff; `j`/`k`
change the selected file from the sidebar or scroll the diff when focused there,
and ``/`` page whichever pane has the keyboard;
`J`/`K` or ``/`` step through files from either; `` (or `za`)
folds the folder or section under the sidebar cursor.

Diffs are compared on the syntax tree, so a reindented or rewrapped block
highlights only the tokens that actually differ.

The mouse works too (including over tmux): the wheel scrolls the pane under the
pointer, and a left click selects a row. Clicking a section, directory, or
recent-commits header folds it, and clicking a sidebar file opens it. Mouse
capture means the terminal's own text selection needs the usual override
(`Shift`, or `Option` in iTerm2).

## How it compares

Pagers like [delta](https://github.com/dandavison/delta) render diffs
beautifully, and [lazygit](https://github.com/jesseduffield/lazygit) and
[gitui](https://github.com/gitui-org/gitui) are great general git TUIs.
diffler is review-first: comments live on diff lines, an agent reads and
answers them over MCP while you watch, and the same threads work against real
GitHub, GitLab and Forgejo pull requests, including ones whose branch you
never checked out.

You may also want to check [tuicr](https://github.com/agavra/tuicr), the
closest alternative.

## MCP tools

While the TUI is running, diffler serves an MCP server the agent uses to read
your review and respond in place. See [docs/mcp.md](docs/mcp.md).

## Configuration

Layered TOML: defaults, then `~/.config/diffler/config.toml` (XDG respected,
macOS included), then `/.diffler/config.toml`, then CLI flags. Every
option and key remap, documented with its default, lives in
[docs/config.example.toml](docs/config.example.toml). Inspect the merged
result and where each value came from:

```sh
diffler config --dump
```

## Themes

Switchable live with `T`, or set `ui.theme`. The
[gallery](showcase/THEMES.md) shows each one.

## Development

```sh
just ci     # core gate: fmt + clippy + tests
just e2e    # PTY end-to-end suite (needs uv)
```

Requires Rust 1.88+, `just`, `cargo-nextest`. Hooks: `prek install`.

## License

MIT or Apache-2.0, at your option.

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [matheusfillipe](https://github.com/matheusfillipe)
- **Source:** [matheusfillipe/diffler](https://github.com/matheusfillipe/diffler)
- **License:** Apache-2.0

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** yes
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/mcp-matheusfillipe-diffler
- Seller: https://agentstack.voostack.com/s/matheusfillipe
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
