Skip to content

Latest commit

ย 

History

178 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

delta

A terminal-based diff review tool for AI-assisted development workflows.

When an AI agent finishes a coding task and checks in with you, delta gives you a structured way to review its changes, leave targeted feedback on specific hunks of code, and export that feedback in a format you can hand directly back to the agent.


The Problem

Reviewing AI-generated code changes typically looks like this:

  1. Agent makes changes and checks in
  2. You hunt through files manually to find what changed
  3. You copy file paths and write a long unstructured message back
  4. Agent iterates โ€” repeat

Steps 2โ€“4 are friction. delta replaces them with a focused review session that produces structured output.


Workflow

delta <from> [<to>]

Opens a terminal UI showing all files changed between <from> and <to> (defaults to HEAD). You navigate the diff, leave notes on specific hunks, and when you quit, delta writes your feedback โ€” anchored to file, hunk, and code context โ€” to stdout (or a file). Feed that output back to the agent.


Installation

Option 1 โ€” Install script

Linux (bash):

curl -sSf https://raw.githubusercontent.com/tbrittain/delta/main/install.sh | bash

Installs to ~/.local/bin. To install elsewhere:

curl -sSf https://raw.githubusercontent.com/tbrittain/delta/main/install.sh | bash -s -- --install-dir /usr/local/bin

Windows (PowerShell 5.1+):

iwr -useb https://raw.githubusercontent.com/tbrittain/delta/main/install.ps1 | iex

Installs to %LOCALAPPDATA%\Programs\delta\ and adds it to your user PATH.

Option 2 โ€” Download a release binary

Download the binary for your platform from the Releases page and place it on your PATH.

Platform File
Linux x86_64 delta-vX.Y.Z-x86_64-unknown-linux-gnu.tar.gz
Windows x86_64 delta-vX.Y.Z-x86_64-pc-windows-msvc.zip

macOS and Linux ARM64 are not supported targets.

Option 3 โ€” Build from source

Requires the Rust toolchain and Git.

git clone https://github.com/tbrittain/delta.git
cargo install --path delta

Usage

delta <base-ref>

Examples:

delta                   # latest commit (HEAD~ vs HEAD) โ€” the default
delta main              # current branch vs main
delta origin/main       # current branch vs remote main
delta HEAD^             # same as bare delta
delta HEAD~3            # changes across the last 3 commits
delta abc1234           # current branch vs a specific commit hash
delta HEAD^2            # current branch vs the second parent of a merge commit
delta abc1234 def5678   # diff between two arbitrary commits
delta main feature      # diff between two branch tips

Both <from> and <to> accept anything git understands as a commit reference. <from> defaults to HEAD~ and <to> defaults to HEAD when omitted.

Note: delta compares committed history only. Staged or unstaged working tree changes are not in scope โ€” commit your changes first, then run delta.

Options:

Flag Description
--output <file> Write feedback to a file instead of stdout
--json Export as JSON instead of markdown

Export to a file:

delta main --output review.md

Pipe output directly into a Claude Code conversation:

Run delta via Claude Code's ! command prefix. Because delta is a TUI, it will automatically open a new terminal window for the review session. When you quit, the output is piped back into the conversation:

! delta main

Leave your notes in the terminal window, press q to quit, and the review appears in the chat for Claude to act on immediately.

To save to a file instead:

! delta main --output review.md

If no terminal window appears, set $TERMINAL to your preferred emulator:

export TERMINAL=gnome-terminal   # or xterm, kitty, alacritty, etc.

Export Format

Markdown (default)

The following are code review notes from a human reviewer. Please address each item before proceeding.

---

## `src/auth.rs` ยท `@@ -42,6 +42,9 @@`

\```diff
-    log::debug!("token: {}", token);
+    log::debug!("authenticated");
\```

> **Human:** The refresh token was being logged in plaintext. Make sure no other sensitive fields are logged nearby.

---

JSON (--json)

{
  "notes": [
    {
      "file": "src/auth.rs",
      "hunk": "@@ -42,6 +42,9 @@",
      "code": "-    log::debug!(\"token: {}\", token);\n+    log::debug!(\"authenticated\");",
      "note": "The refresh token was being logged in plaintext."
    }
  ]
}

Design

Delta does one thing: a human reviews AI-generated code and produces structured output to feed back to the agent. That is the entire scope.

Every feature must be directly central to the review โ†’ structured-output โ†’ agent-feedback loop. Improvements to diff viewing, hunk navigation, comment input, and export format are in scope. Everything else โ€” AI integrations, theme engines, commit tooling, ancillary utilities โ€” is not.

What delta is:

  • A terminal-first, local-first diff review tool
  • An orchestration layer between human reviewers and AI coding agents
  • Git-centric: operates on committed branch changes vs a base ref
  • Read-only: never modifies files

What delta is not:

  • A text editor or merge tool
  • A replacement for GitHub/GitLab code review
  • A persistent review platform โ€” feedback is ephemeral, scoped to one session
  • An AI-integrated tool โ€” no built-in LLM calls, no provider integrations
  • A git difftool driver

Design principles: local-first (no server, no accounts), terminal-first (optimized for tmux/SSH environments), ephemeral review state, git-centric.


Status

Early development. Core review workflow is functional; rough edges may exist.

About

๐Ÿ”บ AI-assisted development workflow code review utility

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Used by

Contributors

Languages