Repolode
yoshiko-pg

yoshiko-pg/difit

A CLI tool that opens a local GitHub-style web viewer for reviewing git commit diffs, with comments you can copy as AI prompts.

Open-source alternative to:GitHub Pull Requests

Stars
3,267
Forks
208
Open issues
24
Last commit
2 months ago

What is it?

difit is a command-line tool for viewing and reviewing local git diffs. Running it starts a small local web server that displays changes in a Files changed view similar to GitHub's pull request page.

Beyond single commits, it can compare two commits or branches, show uncommitted or staged changes, read unified diffs from stdin, and load GitHub pull requests via the GitHub CLI, including unresolved inline review threads. Review comments can be added to lines or ranges, saved in the browser per commit, and copied as formatted prompts for AI coding agents.

The project also ships agent Skills so that tools like coding assistants can open a difit review when the user asks for one. It is built with TypeScript, React, Vite, and Express, and requires Node.js 21 or later.

Key features

  • 01Renders git commit diffs in a GitHub-style Files changed view.
  • 02Compares commits, branches, the working directory, or staged changes.
  • 03Reads unified diffs piped in from any tool via stdin.
  • 04Loads GitHub pull requests through the GitHub CLI and imports unresolved review threads.
  • 05Adds line or range comments and copies them as prompts for AI agents.
  • 06Collapses lock files, minified files, and generated code by default.

Use cases

  • Reviewing your own AI-generated changes before committing.
  • Sending line-level feedback to a coding agent as structured prompts.
  • Reading a GitHub pull request locally with its existing review threads.
  • Viewing diffs from non-git tools such as diff -u or saved patch files.

Quick start

  1. 1

    Try it without installing

    npx difit
  2. 2

    Install globally

    npm install -g difit
  3. 3

    Run in a git repository to view the latest commit diff

    difit

Things to know

  • Requires Node.js 21.0.0 or newer and a git repository with commits.
  • The --pr mode additionally needs the GitHub CLI (gh) installed.

Topics

FAQ

What is difit?
A CLI tool that opens a local GitHub-style web viewer for reviewing git commit diffs, with comments you can copy as AI prompts. difit is a command-line tool for viewing and reviewing local git diffs. Running it starts a small local web server that displays changes in a Files changed view similar to GitHub's pull request page.
Is difit free to use? What license does it have?
difit is open source under the MIT license. Check the license terms before using it in commercial products.
Is difit still maintained?
Updated within 6 months. The last commit to difit was on Aug 28, 2026.
What can I use difit for?
Reviewing your own AI-generated changes before committing. Sending line-level feedback to a coding agent as structured prompts. Reading a GitHub pull request locally with its existing review threads. Viewing diffs from non-git tools such as diff -u or saved patch files.
How do I install difit?
Try it without installing: npx difit Install globally: npm install -g difit Run in a git repository to view the latest commit diff: difit
Where can I get difit?
The source code and installation instructions are on GitHub: https://github.com/yoshiko-pg/difit

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects