Features
- Conventional commits — Generates properly formatted commit messages with type, scope, and past-tense summary (≤72 chars)
- Automatic changelogs — Maintains
CHANGELOG.mdfollowing Keep a Changelog format with monorepo support - Compose mode — Splits large staged changes into multiple logical atomic commits
- Rewrite mode — Converts entire git history to conventional commits (with automatic backup)
- Map-reduce analysis — Parallel per-file analysis for large commits without truncation
- Any LLM provider — Works with Anthropic, OpenAI, OpenRouter, or any OpenAI-compatible API
Quick Start
# Install
# Configure (pick one)
# Direct Anthropic
# OpenRouter
# Use
Usage
Basic Commands
# Modes
# Models
# Context
Compose Mode
Split staged changes into multiple logical commits:
Rewrite Mode
Convert repository history to conventional commits:
Automatic Changelog
lgit automatically maintains CHANGELOG.md files when committing:
- Auto-detection — Finds all
CHANGELOG.mdfiles in your repository - Monorepo support — Routes changes to the correct changelog based on file paths
- Deduplication — Skips entries semantically similar to existing ones
- Category mapping — Maps commit types to sections (Added, Fixed, Changed, etc.)
project/
├── CHANGELOG.md ← covers: src/, docs/
├── packages/
│ ├── core/
│ │ └── CHANGELOG.md ← covers: packages/core/**
│ └── cli/
│ └── CHANGELOG.md ← covers: packages/cli/**
Disable with --no-changelog or changelog_enabled = false in config.
Configuration
Create ~/.config/llm-git/config.toml:
# API
= "http://localhost:4000" # Default: LiteLLM proxy
= "sk-..." # Or use LLM_GIT_API_KEY env var
# Models
= "claude-sonnet-4.5" # For diff analysis
= "claude-haiku-4-5" # For summary generation
# Commit message limits
= 72 # Target length
= 96 # Triggers retry
= 128 # Absolute max
# Features
= true
= true # Parallel analysis for large commits
= 0.2
Provider Examples
Anthropic Direct:
= "https://api.anthropic.com/v1"
= "sk-ant-..."
OpenRouter:
= "https://openrouter.ai/api/v1"
= "sk-or-..."
= "anthropic/claude-sonnet-4.5"
OpenAI:
= "https://api.openai.com/v1"
= "sk-..."
= "gpt-4o"
= "gpt-4o-mini"
Commit Types
Customize commit type classification:
[]
= "New public API or user-observable behavior change"
= ["pub fn", "pub struct", "export function"]
[]
= "Fixes incorrect behavior"
= ["unwrap() → ?", "bounds check", "error handling"]
[]
= "Internal restructuring with unchanged behavior"
= "If behavior changes, use feat instead."
Changelog Categories
[[]]
= "Breaking"
= "Breaking Changes"
= ["breaking", "incompatible"]
[[]]
= "Added"
= ["feat"]
[[]]
= "Fixed"
= ["fix"]
[[]]
= "Changed"
= true
Environment Variables
| Variable | Description | Default |
|---|---|---|
LLM_GIT_API_URL |
API endpoint | http://localhost:4000 |
LLM_GIT_API_KEY |
API key | none |
LLM_GIT_CONFIG |
Config file path | ~/.config/llm-git/config.toml |
LLM_GIT_VERBOSE |
Debug output | false |
Installation
From crates.io
From source
Prerequisites
- Rust nightly toolchain
- Git
- API access (Anthropic, OpenAI, OpenRouter, or local LiteLLM proxy)
License
MIT