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 |
Metadata
Release files for llama-diff 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| llama_diff-0.1.1.tar.gz | 24.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| llama_diff-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 50.9 kB
Release files / llama_diff-0.1.1.tar.gz
| Download URL | llama_diff-0.1.1.tar.gz |
|---|---|
| Size | 24.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
56dd940993b20c385cc5ee51c79efd417924dc315d34f95a987213c84627fa35
|
|
BLAKE2b-256 checksum How to use checksums |
c502c8ff7dd8c88e8e6d0443cba2593f3a5484187bf92059021865e9b96c6635
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.10
|
Release files / llama_diff-0.1.1-py3-none-any.whl
| Download URL | llama_diff-0.1.1-py3-none-any.whl |
|---|---|
| Size | 26.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7299cbc432c650cfcdb1da58da920e9b1c7c09455ac6c62f0a7d88ee2a2dd05b
|
|
BLAKE2b-256 checksum How to use checksums |
27c40e9bf9e24131e3e7a0c41eadab92845c952c048efe39b3f000142980191c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.10
|