Menu β–Ύ β–΄

Tree [735951] main /
 History

HTTPS access


File Date Author Commit
 .github 6 days ago Shrijith Venkatramana Shrijith Venkatramana [74ad2f] init git-lrc
 gfx 2 days ago Shrijith Venkatramana Shrijith Venkatramana [735951] more demos
 hooks 6 days ago Shrijith Venkatramana Shrijith Venkatramana [74ad2f] init git-lrc
 internal 6 days ago Shrijith Venkatramana Shrijith Venkatramana [74ad2f] init git-lrc
 scripts 6 days ago Shrijith Venkatramana Shrijith Venkatramana [ff8c44] lrc installation script
 static 2 days ago Shrijith Venkatramana Shrijith Venkatramana [d84927] omment navigation ui
 .env.example 6 days ago Shrijith Venkatramana Shrijith Venkatramana [e75fc4] refactor: extract build variables to env config
 .gitignore 6 days ago Shrijith Venkatramana Shrijith Venkatramana [74ad2f] init git-lrc
 .lrc.toml.sample 6 days ago Shrijith Venkatramana Shrijith Venkatramana [74ad2f] init git-lrc
 CONTRIBUTOR_LICENSE_AGREEMENT.md 6 days ago Shrijith Venkatramana Shrijith Venkatramana [74ad2f] init git-lrc
 LICENSE.md 6 days ago Shrijith Venkatramana Shrijith Venkatramana [74ad2f] init git-lrc
 LRC_README.md 6 days ago Shrijith Venkatramana Shrijith Venkatramana [74ad2f] init git-lrc
 Makefile 6 days ago Shrijith Venkatramana Shrijith Venkatramana [e75fc4] refactor: extract build variables to env config
 README.md 2 days ago Shrijith Venkatramana Shrijith Venkatramana [735951] more demos
 go.mod 6 days ago Shrijith Venkatramana Shrijith Venkatramana [341a44] lrc setup
 go.sum 6 days ago Shrijith Venkatramana Shrijith Venkatramana [341a44] lrc setup
 hook_templates.go 6 days ago Shrijith Venkatramana Shrijith Venkatramana [74ad2f] init git-lrc
 html_output_test.go 6 days ago Shrijith Venkatramana Shrijith Venkatramana [74ad2f] init git-lrc
 html_template.go 6 days ago Shrijith Venkatramana Shrijith Venkatramana [74ad2f] init git-lrc
 main.go 2 days ago Shrijith Venkatramana Shrijith Venkatramana [2e870c] lrc: bump version v0.1.25 β†’ v0.1.26
 review_state.go 6 days ago Shrijith Venkatramana Shrijith Venkatramana [74ad2f] init git-lrc
 reviewdb.go 6 days ago Shrijith Venkatramana Shrijith Venkatramana [74ad2f] init git-lrc
 setup.go 4 days ago Shrijith Venkatramana Shrijith Venkatramana [ca22c8] Mention request source
 static_serve.go 6 days ago Shrijith Venkatramana Shrijith Venkatramana [74ad2f] init git-lrc

Read Me

git-lrc

Check AI-Generated Code With Git Hooks

AI agents write code fast. They also silently remove logic, change behavior, and introduce bugs -- without telling you. You often find out in production.

git-lrc fixes this. It hooks into git commit and reviews every diff before it lands. 60-second setup. Completely free.

See It In Action

See git-lrc catch serious security issues such as leaked credentials, expensive cloud
operations, and sensitive material in log statements

https://github.com/user-attachments/assets/1b4984c9-b21b-4bad-9d39-1ace6ee4e054

Why

  • πŸ€– AI agents silently break things. Code removed. Logic changed. Edge cases gone. You won't notice until production.
  • πŸ” Catch it before it ships. AI-powered inline comments show you exactly what changed and what looks wrong.
  • πŸ” Build a habit, ship better code. Regular review β†’ fewer bugs β†’ more robust code β†’ better results in your team.
  • πŸ”— Why git? Git is universal. Every editor, every IDE, every AI toolkit uses it. Committing is mandatory. So there's almost no chance of missing a review β€” regardless of your stack.

Get Started

Install

Linux / macOS:

curl -fsSL https://hexmos.com/lrc-install.sh | sudo bash

Windows (PowerShell):

iwr -useb https://hexmos.com/lrc-install.ps1 | iex

Binary installed. Hooks set up globally. Done.

Setup

git lrc setup

Here's a quick video of how setup works:

https://github.com/user-attachments/assets/392a4605-6e45-42ad-b2d9-6435312444b5

Two steps, both open in your browser:

  1. LiveReview API key β€” sign in with Hexmos
  2. Free Gemini API key β€” grab one from Google AI Studio

~1 minute. One-time setup, machine-wide. After this, every git repo on your machine triggers review on commit. No per-repo config needed.

How It Works

Option A: Review on commit (automatic)

git add .
git commit -m "add payment validation"
# review launches automatically before the commit goes through

Option B: Review before commit (manual)

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

Either way, a web UI opens in your browser.

https://github.com/user-attachments/assets/ae063e39-379f-4815-9954-f0e2ab5b9cde

The Review UI

  • πŸ“„ GitHub-style diff β€” color-coded additions/deletions
  • πŸ’¬ Inline AI comments β€” at the exact lines that matter, with severity badges
  • πŸ“ Review summary β€” high-level overview of what the AI found
  • πŸ“ Staged file list β€” see all staged files at a glance, jump between them
  • πŸ“Š Diff summary β€” lines added/removed per file for a quick sense of change scope
  • πŸ“‹ Copy issues β€” one click to copy all AI-flagged issues, ready to paste back into your AI agent
  • πŸ”„ Cycle through issues β€” navigate between comments one by one without scrolling
  • πŸ“œ Event log β€” track review events, iterations, and status changes in one place

https://github.com/user-attachments/assets/b579d7c6-bdf6-458b-b446-006ca41fe47d

The Decision

Action What happens
βœ… Commit Accept and commit the reviewed changes
πŸš€ Commit & Push Commit and push to remote in one step
⏭️ Skip Abort the commit β€” go fix issues first
πŸ“Ž Screenshot: Pre-commit bar showing Commit / Commit & Push / Skip buttons

The Review Cycle

Typical workflow with AI-generated code:

  1. Generate code with your AI agent
  2. git add . β†’ git lrc review β€” AI flags issues
  3. Copy issues, feed them back to your agent to fix
  4. git add . β†’ git lrc review β€” AI reviews again
  5. Repeat until satisfied
  6. git lrc review --vouch β†’ git commit β€” you vouch and commit

Each git lrc review is an iteration. The tool tracks how many iterations you did and what percentage of the diff was AI-reviewed (coverage).

Vouch

Once you've iterated enough and you're satisfied with the code:

git lrc review --vouch

This says: "I've reviewed this β€” through AI iterations or personally β€” and I take responsibility." No AI review runs, but coverage stats from prior iterations are recorded.

Skip

Just want to commit without review or responsibility attestation?

git lrc review --skip

No AI review. No personal attestation. The git log will record skipped.

Git Log Tracking

Every commit gets a review status line appended to its git log message:

LiveReview Pre-Commit Check: ran (iter:3, coverage:85%)
LiveReview Pre-Commit Check: vouched (iter:2, coverage:50%)
LiveReview Pre-Commit Check: skipped
  • iter β€” number of review cycles before committing. iter:3 = three rounds of review β†’ fix β†’ review.
  • coverage β€” percentage of the final diff already AI-reviewed in prior iterations. coverage:85% = only 15% of the code is unreviewed.

Your team sees exactly which commits were reviewed, vouched, or skipped β€” right in git log.

FAQ

Review vs Vouch vs Skip?

Review Vouch Skip
AI reviews the diff? βœ… Yes ❌ No ❌ No
Takes responsibility? βœ… Yes βœ… Yes, explicitly ⚠️ No
Tracks iterations? βœ… Yes βœ… Records prior coverage ❌ No
Git log message ran (iter:N, coverage:X%) vouched (iter:N, coverage:X%) skipped
When to use Each review cycle Done iterating, ready to commit Not reviewing this commit

Review is the default. AI analyzes your staged diff and gives inline feedback. Each review is one iteration in the change–review cycle.

Vouch means you're explicitly taking responsibility for this commit. Typically used after multiple review iterations β€” you've gone back and forth, fixed issues, and are now satisfied. The AI doesn't run again, but your prior iteration and coverage stats are recorded.

Skip means you're not reviewing this particular commit. Maybe it's trivial, maybe it's not critical β€” the reason is yours. The git log simply records skipped.

How is this free?

git-lrc uses Google's Gemini API for AI reviews. Gemini offers a generous free tier. You bring your own API key β€” there's no middleman billing. The LiveReview cloud service that coordinates reviews is free for individual developers.

What data is sent?

Only the staged diff is analyzed. No full repository context is uploaded, and diffs are not stored after review.

Can I disable it for a specific repo?

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

Can I review an older commit?

git lrc review --commit HEAD       # review the last commit
git lrc review --commit HEAD~3..HEAD  # review a range

Quick Reference

Command Description
lrc or lrc review Review staged changes
lrc review --vouch Vouch β€” skip AI, take personal responsibility
lrc review --skip Skip review for this commit
lrc review --commit HEAD Review an already-committed change
lrc hooks disable Disable hooks for current repo
lrc hooks enable Re-enable hooks for current repo
lrc hooks status Show hook status
lrc self-update Update to latest version
lrc version Show version info

Tip: git lrc <command> and lrc <command> are interchangeable.

It's Free. Share It.

git-lrc is completely free. No credit card. No trial. No catch.

If it helps you β€” share it with your developer friends. The more people review AI-generated code, the fewer bugs make it to production.

⭐ Star this repo to help others discover it.

License

git-lrc is distributed under a modified variant of Sustainable Use License (SUL).

[!NOTE]

What this means:
- βœ… Source Available β€” Full source code is available for self-hosting
- βœ… Business Use Allowed β€” Use LiveReview for your internal business operations
- βœ… Modifications Allowed β€” Customize for your own use
- ❌ No Resale β€” Cannot be resold or offered as a competing service
- ❌ No Redistribution β€” Cannot redistribute modified versions commercially

This license ensures LiveReview remains sustainable while giving you full access to self-host and customize for your needs.

For detailed terms, examples of permitted and prohibited uses, and definitions, see the full
LICENSE.md.


For Teams: LiveReview

Using git-lrc solo? Great. Building with a team? Check out LiveReview β€” the full suite for team-wide AI code review, with dashboards, org-level policies, and review analytics. Everything git-lrc does, plus team coordination.