Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI Diff

A keyboard-first review desk for diffs and documents. Launch it from the CLI, jump around like a code editor, and export inline comments back to automation without losing your flow.

Why AI Diff

  • Fast review loops: open a range, scan, comment, close, and get JSON back.
  • Keyboard-centric: /, n/N, j/k, gg/G, : by default.
  • Flexible inputs: diff two refs, review a single file, or inject text.
  • Local-first: comments live under .ai-diff inside the repo.

Features

  • Diff view for base..head ranges.
  • Document mode for text or files outside git.
  • Inline comments stored per repo and exported on close.
  • Tauri + React UI, with a web fallback for HTTP mode.

Quick Start (dev)

npm install
npm run dev
AI_DIFF_COMMENTS=1 TAURI_DEV=1 TAURI_DEV_URL=http://localhost:5173 \
  cargo run --manifest-path src-tauri/Cargo.toml -- --repo /path/to/repo

Usage

CLI flags

  • --repo /path Set repository root (diff mode).
  • --base ref Base ref for diff (defaults to main/master fallback).
  • --head ref Head ref for diff (defaults to HEAD).
  • --open-file /path Open a file; auto-detects git root.
  • --text "..." Review injected text.
  • --text-base64 "..." Review base64 text.
  • --stdin Read review text from stdin.
  • --name "Label" Label for document mode.
  • --export relative/path.json Export comments on close.
  • --stdout Print comments to stdout on close.
  • --export-all Export all comments for the repo.

Output behavior

When AI Diff is started with CLI args, it prints comment JSON to stdout on close by default. Pass --export to write a file instead.

Keyboard cheatsheet

  • / Focus search
  • n/N Next/previous search result
  • j/k Next/previous file
  • gg/G Jump to top/bottom
  • : Jump to a line number (:+42, :-7, or :120)

Configuration

Optional environment variables:

  • VITE_AI_DIFF_API_BASE Base URL for the HTTP API (web mode).
  • AI_DIFF_CORS Comma-separated allowed origins for the HTTP API (* to allow all).
  • AI_DIFF_RATE_WINDOW Rate limit window in ms.
  • AI_DIFF_RATE_LIMIT Requests per window.
  • AI_DIFF_DEBUG_ERRORS Set to 1 to expose server error details.

Packaging

npm run tauri:build

Artifacts land in:

src-tauri/target/release/bundle/

Tests

npm run lint
npm run test
npm run test:server
npm run test:e2e
cargo test --manifest-path src-tauri/Cargo.toml

Contributing

See CONTRIBUTING.md for local setup, coding standards, and review notes.

License

MIT. See LICENSE.

About

Keyboard-first diff review desk with inline comments and CLI integration.

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages