Skip to content

zhihaoh-me/DiffClaw

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

DiffClaw

A local Git diff viewer/GUI for reviewing and commenting on AI-generated code, designed for human-in-the-loop workflows.

Split and Unified Diff View

Split and Unified Diff View

Inline Code Comments

Inline Code Comments

Auto-Generated AI Prompt

Auto-Generated AI Prompt


Why DiffClaw?

AI coding agents generate code fast—but humans still need to review it. DiffClaw gives you a native macOS app to review git diffs, add inline comments, and export feedback in a format AI agents can read.

  • 100% Local — No accounts, no cloud, no network. Your code stays on your machine.
  • Built for AI Workflows — Export comments to markdown that AI agents can process.
  • Native macOS — Fast, lightweight SwiftUI app with GitHub-style dark theme.

Features

  • GitHub-style Diff Viewer — Dark theme with syntax-colored additions/deletions
  • Inline Comments — Click any line to add review feedback
  • Multi-Tab Support — Review multiple repositories simultaneously
  • One-Click Export — Generate .diffclaw-review.md for AI agents
  • Live Refresh — See latest uncommitted changes with Cmd+R
  • Zero Dependencies — Just git and Xcode

Quick Start

Requirements

  • macOS 14.0+
  • Xcode 15+ (for building)
  • Git

Build & Run

git clone https://github.com/anthropics/DiffClaw.git
cd DiffClaw/DiffClaw
open DiffClaw.xcodeproj

In Xcode: Product → Run (or Cmd+R)


How It Works

  1. Open a Git Repository — Select any folder with uncommitted changes
  2. Review the Diff — Browse files, see additions (green) and deletions (red)
  3. Add Comments — Hover over a line, click +, write your feedback
  4. Submit Review — Choose "Comment" to export, or "Approve" if code looks good
  5. AI Reads Feedback — The markdown file is ready for your AI agent to process

The Review File

When you submit comments, DiffClaw creates .diffclaw-review.md in your repo:

# Code Review Comments

**Repository:** /path/to/your/repo
**Branch:** feature/new-feature
**Date:** 2024-02-08 14:30:00

---

## src/components/Button.swift

### Line 42 (new)
Consider adding error handling here.

### Line 58 (new)
This could be simplified using guard let.

Point your AI agent to this file for context-aware fixes.


License

MIT

About

A local Git diff viewer/GUI for reviewing and commenting on AI-generated code, designed for human-in-the-loop workflows

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages