AI-powered Git diff analysis tool β transform any git diff into structured code review reports, team-aware change breakdowns, and churn heatmaps. Built for developers, team leads, and anyone who reviews code.
π Live Demo: Diff-Insight
DiffInsight takes a raw git diff and turns it into something actually useful β a structured review report, a breakdown of which parts of your codebase changed, merge conflict warnings, and a timeline showing which files keep getting touched across multiple versions.
It runs entirely in the browser, connects to Groq's free LLM API for AI analysis, and works on diffs from any language or framework.
Upload a .diff, .patch, or .txt file β or paste a diff directly β and get a structured LLM-generated report in seconds.
- Senior Reviewer mode β concise, critical analysis focused on risks and actionable suggestions
- Junior Mentor mode β plain-English explanations, learning points, and encouragement for newer developers
- Supports standard git diff,
diff -ruN, and most unified diff variants - Files containing secrets (
.env, private keys, vault configs) are automatically stripped before reaching the LLM
A team-aware breakdown of every file in the diff β works on any language, no AST parsing required.
- Layers Touched β instantly see which architectural layers were affected: Backend, Frontend, LLM/AI, Security, Tests, Config/Infra, Database, and more
- Change Type Classification β every file labelled as NEW, MODIFIED, EXPANDED, REFACTORED, or DELETED
- Merge Conflict Candidates β files flagged High/Medium/Low risk based on deletion ratio and churn volume
- Churn Bar β proportional visualisation of how much each file changed relative to the total
- File Type Breakdown β quick read on whether it was a backend-only, full-stack, or config change
Compare multiple versions of the same project to see which files keep getting touched.
- Add up to 20 diffs with custom labels (e.g.
v1βv2,sprint-3,hotfix-auth) - Hotspot Leaderboard β top 5 files ranked by total churn across all diffs with medal rankings
- Heatmap Grid β files Γ diffs matrix with colour-intensity cells (purple = low churn β orange = high churn)
- Hover tooltips showing exact churn count and change type per cell
- Churn bar and touches column showing cross-diff coverage at a glance
Ask any technical question and get a structured answer from the LLM.
- Auto-detects topic from your question (40+ keywords: FastAPI, Docker, PostgreSQL, Redis, Terraform, AWS, PyTorch, RAG, JWT, and more)
- Structured answers covering: explanation, real example, industry use case, and common mistake
- Powered by Groq's
llama-3.3-70b-versatilemodel
Search GitHub repositories without leaving the app.
- Search by topic and filter by language
- Sort by β Stars, π΄ Forks, π Recently Updated, π Most Issues, ποΈ Most Watchers
- Fetches up to 1000 results and sorts the full set client-side β every sort option operates over all results, not just the first page
- Results show all 5 metrics plus last updated date and a direct link
- Two-layer diff sanitiser β sensitive file paths (
.env,.pem,secret_manager,id_rsa) are completely blocked before the LLM sees them; individual lines with credential-shaped values are redacted in-place - GitHub token stored via HashiCorp Vault locally, or plain environment variable on cloud
- Rate limiting β 10 requests per 60 seconds per IP
- Sanitisation warning banner in the UI if any content was stripped
Live Demo: Diff-Insight
Deployed on Railway with:
- Groq API (
llama-3.3-70b-versatile) for LLM analysis β free tier, no GPU needed - FastAPI backend with uvicorn
- GitHub token via Railway environment variables
A git diff is a text file showing exactly what changed between two versions of your code β which lines were added, removed, or modified. DiffInsight reads this file and analyses it.
diff --git a/backend/main.py b/backend/main.py
--- a/backend/main.py β original file
+++ b/backend/main.py β updated file
@@ -10,6 +10,8 @@ β hunk header: line numbers affected
def home(): β unchanged context line (space prefix)
- return "hello" β line that was REMOVED (minus prefix)
+ return "hello world" β line that was ADDED (plus prefix)
+ # updated greeting β another added line| Symbol | Meaning |
|---|---|
--- |
Original (old) version of the file |
+++ |
Updated (new) version of the file |
@@ |
Hunk header showing which line numbers changed |
- |
Line that was removed |
+ |
Line that was added |
(space) |
Unchanged context line |
Find your commit hashes with git log, then diff them.
# See your recent commits
git log --oneline
# Output example:
# a1b2c3d Add login feature
# e4f5g6h Fix bug in auth
# i7j8k9l Initial commit
# Compare any two commits (older β newer)
git diff i7j8k9l a1b2c3d > my_diff.txtUse this when reviewing a feature branch before merging into main.
# Compare feature branch against main
git diff main feature-branch > branch_diff.txt
# Compare your current branch against main
git diff main > current_vs_main.txtUse this to review what you have changed before committing.
# All unstaged changes (files edited but not staged yet)
git diff > unstaged.txt
# All staged changes (files you ran git add on)
git diff --staged > staged.txt
# Everything changed since last commit (staged + unstaged)
git diff HEAD > all_changes.txtUse this to see everything that changed between two versions of your project.
# Compare release tags
git diff v1.0 v2.0 > release_diff.txt
# Compare a tag against current state
git diff v1.0 HEAD > since_v1.txtUse this when you only care about one file's history.
# See how one file changed between two commits
git diff e4f5g6h a1b2c3d -- backend/main.py > main_py_diff.txt
# See all changes to one file since last commit
git diff HEAD -- backend/main.py > main_changes.txtUse this when you have two versions of a project as separate folders with no shared git history.
# Unzip your versions
unzip project-v1.zip -d v1
unzip project-v2.zip -d v2
# Generate the diff recursively across all files
diff -ru v1/ v2/ > v1_to_v2.txt
# If the zip extracts into a subfolder, go one level deeper
diff -ru v1/project-main/ v2/project-main/ > v1_to_v2.txtThe -r flag means recursive (goes through all subfolders) and -u gives unified format which DiffInsight can read.
If you have three versions of a project (v1, v2, v3), generate all combinations and load them into the Churn Heatmap to see which files changed the most across the entire history.
# Generate all three diffs
diff -ru v1/ v2/ > v1_to_v2.txt
diff -ru v2/ v3/ > v2_to_v3.txt
diff -ru v1/ v3/ > v1_to_v3.txtThen in DiffInsight β Churn Heatmap:
- Paste
v1_to_v2.txtβ labelv1βv2β click Add Diff - Paste
v2_to_v3.txtβ labelv2βv3β click Add Diff - Paste
v1_to_v3.txtβ labelv1βv3β click Add Diff - Click Generate Heatmap
You will see exactly which files were touched in every version and which ones are hotspots.
- Always save with
>to write the output to a file β without it the diff just prints to the terminal and disappears - Use
.txtextension β DiffInsight accepts.diff,.patch, and.txt - If your diff file is empty, the two versions are probably identical, or the folders extracted with a nested subfolder β try going one level deeper
- Large diffs (thousands of lines) work fine β DiffInsight handles up to 5MB
- Python 3.10+
- A free Groq API key
- A GitHub Personal Access Token (for GitHub Explorer)
git clone https://github.com/ShreyaVijaykumar/Diff-Insight.git
cd Diff-Insight/diffinsightpip install -r requirements.txtCreate a .env file β it is already in .gitignore so it will never be committed:
GROQ_API_KEY=gsk_your_key_here
GITHUB_TOKEN=ghp_your_token_here
Get your free Groq API key at console.groq.com
Get your GitHub token at github.com/settings/tokens β tick the public_repo scope.
uvicorn backend.main:app --reloadhttp://127.0.0.1:8000
diffinsight/
βββ backend/
β βββ main.py # FastAPI app, all endpoints, rate limiting
β βββ llm/
β β βββ analyzer.py # Groq-powered diff analysis
β β βββ tech_assistant.py # Groq-powered Q&A with topic detection
β βββ security/
β β βββ secret_manager.py # Vault + env var fallback for tokens
β βββ services/
β β βββ github_service.py # GitHub search with full result set sorting
β βββ utils/
β βββ change_intelligence.py # Team-aware diff breakdown (any language)
β βββ churn_heatmap.py # Multi-diff heatmap matrix builder
β βββ diff_sanitiser.py # Two-layer secret stripping before LLM
β βββ risk.py # Risk level computation
βββ frontend/
β βββ templates/
β β βββ index.html # Single-page app
β βββ static/
β βββ script.js # All frontend logic
β βββ style.css # Dark glass UI with purple/orange gradients
βββ railway.toml # Railway deployment config
βββ requirements.txt
βββ .env.example # Template for environment variables
| Layer | Technology |
|---|---|
| Backend | FastAPI, Python 3.11 |
| LLM | Groq API β llama-3.3-70b-versatile |
| Diff Parsing | unidiff |
| Frontend | Vanilla JS, CSS (glass morphism) |
| Fonts | Syne + JetBrains Mono |
| Secrets | HashiCorp Vault (local) / env vars (cloud) |
| Deployment | Railway |
- Sensitive files (
.env, private keys, vault configs, credential files) are completely removed from the diff before the LLM sees anything - Hardcoded secrets in non-sensitive files (tokens, passwords, connection strings) are redacted in-place β the diff structure is preserved but values are replaced with
[REDACTED] - The UI shows a warning banner if any content was stripped, so you always know what the LLM saw
- GitHub tokens never appear in code β retrieved from Vault or environment variables only
- Rate limiting prevents abuse β 10 requests per 60 seconds per IP address
- PR description auto-writer from diff
- Reviewer assignment suggester based on layers touched
- Commit message quality scorer
- Diff history and session comparison
- Export report as markdown / PDF
- JavaScript/TypeScript dependency graph support
Shreya Vijaykumar github.com/ShreyaVijaykumar