AI-powered code review for git diffs
Project description
LlamaDiff
A Python-based code review tool that analyzes git diffs between branches using LLMs.
License
Licensed under the Apache License, Version 2.0.
Features
- Compare any two git branches and get AI-powered code review
- Supports multiple LLM providers via litellm:
- Ollama (local, default)
- OpenAI (GPT-4, GPT-4o, etc.)
- Anthropic (Claude)
- OpenRouter (access to many models)
Installation
Via pipx (recommended)
# Run directly without installing
pipx run llama-diff -s feature -t main
# Or install globally
pipx install llama-diff
Via pip
pip install llama-diff
From source
git clone https://github.com/ernestp/LlamaDiff.git
cd LlamaDiff
pip install -e .
Configuration
Copy .env.example to .env and configure your preferred provider:
cp .env.example .env
Usage
# Basic usage (compare current branch to main)
llama-diff --source feature-branch --target main
# Using a specific model
llama-diff -s feature -t main --model ollama/codellama
# Using OpenAI
llama-diff -s feature -t main --model gpt-4o
# Review specific files only
llama-diff -s feature -t main --files "*.py"
# Output to file
llama-diff -s feature -t main --output review.md
# Interactive HTML review
llama-diff -s feature -t main --html
# Review uncommitted changes
llama-diff --uncommitted
Model Examples
| Provider | Model Example |
|---|---|
| Ollama | ollama/llama3.2, ollama/codellama |
| OpenAI | gpt-5.2, gpt-5.1, gpt-4o, gpt-4o-mini |
| Anthropic | claude-sonnet-4.5, claude-opus-4.5 |
| OpenRouter | openrouter/anthropic/claude-sonnet-4.5, openrouter/anthropic/claude-opus-4.5 |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
llama_diff-0.1.1.tar.gz
(24.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file llama_diff-0.1.1.tar.gz.
File metadata
- Download URL: llama_diff-0.1.1.tar.gz
- Upload date:
- Size: 24.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
56dd940993b20c385cc5ee51c79efd417924dc315d34f95a987213c84627fa35
|
|
| MD5 |
1e724d9ec7cca5d46091c363aad52460
|
|
| BLAKE2b-256 |
c502c8ff7dd8c88e8e6d0443cba2593f3a5484187bf92059021865e9b96c6635
|
File details
Details for the file llama_diff-0.1.1-py3-none-any.whl.
File metadata
- Download URL: llama_diff-0.1.1-py3-none-any.whl
- Upload date:
- Size: 26.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7299cbc432c650cfcdb1da58da920e9b1c7c09455ac6c62f0a7d88ee2a2dd05b
|
|
| MD5 |
f43cb472297e02ff349c7321403b1005
|
|
| BLAKE2b-256 |
27c40e9bf9e24131e3e7a0c41eadab92845c952c048efe39b3f000142980191c
|