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)
pipx install git+https://github.com/ernestp/LlamaDiff.git
Via pip
pip install git+https://github.com/ernestp/LlamaDiff.git
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.0.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.0.tar.gz.
File metadata
- Download URL: llama_diff-0.1.0.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 |
7506d14aeee437a65f81c0332f8d37b9ce3598b081083545b06db23fd57843cf
|
|
| MD5 |
5a2863939acb5bfaee85e675d441b2c1
|
|
| BLAKE2b-256 |
2b979eae3385d9b598ec1902852ac497cba8ff8715f82575eb17baddf921b2ae
|
File details
Details for the file llama_diff-0.1.0-py3-none-any.whl.
File metadata
- Download URL: llama_diff-0.1.0-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 |
830f640c2f70b50215c93b2f3f3eb1927a62c5b4e49a60098fd86672e07af408
|
|
| MD5 |
8ff1f24af30e017916172bf44a835cbe
|
|
| BLAKE2b-256 |
0bdc6ded563777938a5090d29b43463f6fc52a2c9dd4549e91996e8798c29829
|