A CLI that generates Git and Jujutsu commit messages with AI providers such as Ollama, OpenAI, Claude, Gemini and Mistral.
HexmosTech/git-lrc
A git commit hook that runs an AI code review on every staged diff before the commit lands, with a browser UI for inline comments.
- Stars
- 1,481
- Forks
- 189
- Open issues
- 20
- Last commit
- 3 days ago
What is it?
git-lrc hooks into git commit and runs an AI review on the staged diff before the commit is finalized. Findings appear as inline comments in a GitHub-style diff view in the browser, each with a severity badge, so problems such as removed logic, leaked credentials, or costly cloud calls can be fixed before the code enters git history.
The default AI backend is Google's Gemini API, and users can bring their own keys for OpenAI, Claude, DeepSeek, OpenRouter, or an Anthropic-compatible endpoint. Each review is tracked as an iteration with a coverage percentage, and the result is written into the commit message as a status line such as ran, vouched, or skipped. A repository can also define reviewer guidance in a .lrc/ directory and exclude files with gitignore-style patterns.
The tool supports an agent mode that runs non-interactively and outputs JSON, which suits coding agents and CI workflows. It also includes a risk-scored view that ranks hunks by blast radius and review priority, using a locally indexed codebase graph.
Key features
- 01Runs an AI review automatically on git commit, or manually via git lrc review.
- 02Shows inline comments with severity badges in a browser-based diff view.
- 03Supports Gemini by default and bring-your-own keys for OpenAI, Claude, DeepSeek, and OpenRouter.
- 04Records review status, iteration count, and coverage in each commit message.
- 05Provides an agent mode that outputs JSON for coding agents and CI.
Use cases
- Catching leaked credentials, risky cloud calls, or removed logic in code written by AI coding agents.
- Enforcing a consistent commit-time review step across repositories and editors.
- Letting coding agents run a review and read structured findings before committing.
- Recording which commits were reviewed, vouched, or skipped directly in git log.
Quick start
- 1
Run the official install script from the README (pipes a script into bash; run it yourself after reviewing)
- 2
Run setup to add your LiveReview and Gemini API keys
git lrc setup - 3
Stage your changes and commit; the review runs automatically before the commit
git add . && git commit -m "your message"
Things to know
- The license is not clearly specified (listed as NOASSERTION), so check the license terms before use.
- Setup requires API keys, and the free tier depends on bring-your-own AI keys.
- The free tier is limited to 30k lines of code per month; larger usage requires a paid Premium plan.
In collections
Topics
FAQ
- What is git-lrc?
- A git commit hook that runs an AI code review on every staged diff before the commit lands, with a browser UI for inline comments. git-lrc hooks into git commit and runs an AI review on the staged diff before the commit is finalized. Findings appear as inline comments in a GitHub-style diff view in the browser, each with a severity badge, so problems such as removed logic, leaked credentials, or costly cloud calls can be fixed before the code enters git history.
- Is git-lrc free to use? What license does it have?
- git-lrc is open source under the Other license. Check the license terms before using it in commercial products.
- Is git-lrc still maintained?
- Actively maintained. The last commit to git-lrc was on Nov 3, 2026.
- What can I use git-lrc for?
- Catching leaked credentials, risky cloud calls, or removed logic in code written by AI coding agents. Enforcing a consistent commit-time review step across repositories and editors. Letting coding agents run a review and read structured findings before committing. Recording which commits were reviewed, vouched, or skipped directly in git log.
- How do I install git-lrc?
- Run the official install script from the README (pipes a script into bash; run it yourself after reviewing) Run setup to add your LiveReview and Gemini API keys: git lrc setup Stage your changes and commit; the review runs automatically before the commit: git add . && git commit -m "your message"
- Where can I get git-lrc?
- The source code and installation instructions are on GitHub: https://github.com/HexmosTech/git-lrc
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
AI-powered code review tool that posts inline, summary and reply comments on pull and merge requests using LLMs like OpenAI, Claude or Ollama.
Open source AI code review for pull requests that you can self-host, using the LLM provider of your choice.
Open-source AI code reviewer that runs LLM-based reviews on GitHub pull requests and local branch changes, with any model provider.
A Go CLI that generates git commit messages and brief code reviews with LLMs, and can install a prepare-commit-msg git hook.
A CLI that generates git commit messages from your staged changes using an AI model of your choice.