# git-lrc

> A Go CLI that hooks into git commit and runs an AI review of every staged diff before it lands, with a browser review UI and review stats in git log

- Category: AI Coding / AI Code Review & Security
- Language: Go
- Licence: Sustainable Use License (modified, source-available)
- Repository: https://github.com/HexmosTech/git-lrc
- Website: https://hexmos.com/livereview/git-lrc/
- Canonical page: https://ai-tldr.dev/tools/git-lrc/
- Updated: 2026-09-16

## In short

git-lrc is a command-line tool from Hexmos that moves AI code review to commit time. It installs a global git hook, so every git commit in every repository on the machine first sends the staged diff for an AI review. It sits in the AI Code Review & Security category of the AI Coding tools and is open-source, written in Go and licensed Sustainable Use License (modified, source-available).

## Overview

git-lrc is a command-line tool from Hexmos that moves AI code review to commit time. It installs a global git hook, so every git commit in every repository on the machine first sends the staged diff for an AI review. The README's reasoning: by pull-request time faulty code is already committed, pushed and in front of teammates, and IDE extensions are optional and editor-specific, while every engineer commits. It is aimed especially at code produced by AI coding agents, which can silently remove logic, relax constraints or leak credentials.

Each review opens a local web UI with a GitHub-style diff, inline AI comments with severity badges, a review summary and a staged-file list. From there you commit, commit and push, or skip to go fix things. An Issue Navigator filters findings by severity, type and a catalogue of 10 risk categories, and can copy the issues or send them to Claude to feed back into the fix loop. A risk-scored view ranks every hunk by blast radius and review priority using a locally built code graph, and each review also produces a short summary slide deck.

Every commit gets a review status line in its message (ran, vouched or skipped, with iteration count and AI-review coverage), so git log shows which changes were reviewed. Setup signs you in to Hexmos's LiveReview service and uses a free Gemini API key by default; OpenAI, Claude, DeepSeek, OpenRouter, Atlas Cloud and Anthropic-compatible endpoints can be added as bring-your-own-key connectors. The README says only the staged diff is sent and diffs are not stored after review. Pricing is by lines of code reviewed: 30k LOC a month free, with paid Premium and Enterprise tiers.

## What it does

- Global commit hook: every git commit is reviewed automatically, or run git lrc review by hand, with --vouch to take personal responsibility or --skip to bypass
- Browser review UI with a GitHub-style diff, inline AI comments with severity, a summary, per-file diff stats, one-click issue copying and a Commit / Commit & Push / Skip decision
- Issue Navigator that filters findings by severity, type and risk category, with thumbs up/down feedback and Send to Claude, plus an auto-generated summary slide deck for each review
- Risk-scored review view that ranks hunks by blast radius and review priority from a local codebase-memory-mcp knowledge graph, with the contributing signals shown for every score
- Review status written into git log (iterations and coverage), an --agent-mode for coding agents and CI that returns JSON, and a bundled claude-lrc slash-command workflow for Claude Code
- Per-repository rules and ignore patterns in a version-controlled .lrc/ directory, plus bring-your-own-key connectors for Gemini, OpenAI, Claude, DeepSeek, OpenRouter and Atlas Cloud

## Getting started

git-lrc installs as a single binary and sets up its hooks globally. You need a Hexmos (LiveReview) sign-in and, by default, a free Gemini API key from Google AI Studio. The commands below come from the project README.

1. Install git-lrc

   The README recommends Hexmos's IPM installer; a direct install script is the alternative. On Windows use the PowerShell equivalents from the README.

```bash
# Linux/macOS via IPM
curl -L https://hexmos.com/ipm-install | bash && ipm i HexmosTech/git-lrc

# or the direct install script
curl -fsSL https://hexmos.com/lrc-install.sh | bash
```

2. Run the one-time setup

   Setup opens your browser twice: once to sign in with Hexmos for a LiveReview API key and once to get a Gemini API key. After this, every git repository on the machine triggers review on commit.

```bash
git lrc setup
```

3. Commit as usual, or review first

   A normal commit launches the review before it goes through. To iterate before committing, run the review yourself; either way a review UI opens in your browser.

```bash
git add .
git lrc review          # run AI review first
# git lrc review --vouch   # vouch personally, skip AI
# git lrc review --skip    # skip review entirely
git commit -m "add payment validation"
```

4. Let a coding agent or CI run it

   Agent mode runs the review without a browser and prints JSON; a completed review records an agent-reviewed attestation so the next commit proceeds.

```bash
git add .
git lrc review --agent-mode
git commit -m "add payment validation"
```

5. Teach it your repository's rules

   Create a .lrc/ directory with rules/*.md guidance and an ignore file, then check and preview exactly what will be sent to the reviewer.

```bash
lrc config init
lrc config check
lrc config preview
```

6. Manage models and per-repo hooks

   lrc ui manages bring-your-own-key connectors and their priority; hooks can be turned off for a single repository.

```bash
lrc ui
git lrc hooks disable   # disable for current repo
git lrc hooks enable    # re-enable later
```

## When to use it

- Reach for it when AI coding agents write much of your code and you want every diff checked for removed logic, leaked secrets or costly calls before it enters git history
- Reach for it when your team uses different editors and assistants and you want one review checkpoint that does not depend on an IDE extension
- Reach for it when you want git log to record which commits were AI-reviewed, vouched for or skipped, and how much of each diff was covered
- Reach for it when a large diff needs triage and you want its hunks ranked by blast radius so the riskiest changes are read first

## Version history

- 2026-09-16 v0.6.12: Added --agent-mode for one-flag, non-interactive reviews by coding agents and CI with JSON output, plus a new agent-reviewed attestation type; also fixed --no-serve never polling for a plain staged review.
