HexmosTech/git-lrc

Free, Micro AI Code Reviews That Run on Git Commit

What it solves

git-lrc 防止软件宕机、安保漏洞和技术债务,通过在代码写入 git 历史前捕获错误。它专门解决 AI 生成代码的问题,这类代码可能在开发者未注意的情况下悄悄引入 bug、删除关键逻辑或泄露凭证,直到代码进入生产环境才被发现。

How it works

该工具挂钩 git commit 过程,自动触发 AI 驱动的差异审查。它使用基于网页的 UI,以 GitHub 风格的 diff 展示,并在行内添加按严重程度(Critical、Warning、Info)分类的 AI 评论。开发者可以通过修复标记的问题并重新审查,或“vouch”代码以自行承担责任并提交。

Who it’s for

使用 AI 代理生成代码,并希望在所有仓库中拥有一个与编辑器无关的通用安全网,以确保代码质量和安全性的软件工程师和团队。

Highlights

  • Commit-time enforcement: Runs automatically on git commit or manually via git lrc review.
  • Risk-based triage: An Issue Navigator allows filtering by 10 risk categories and 100+ failure patterns.
  • Repository-specific rules: Users can define custom team preferences and constraints in a .lrc/ directory to guide the AI reviewer.
  • Git log tracking: Appends review status (iterations and coverage percentage) directly to the git commit message for institutional memory.
  • Summary Deck: Automatically generates a short slide deck summarizing changes and risks for quick orientation.
  • BYOK Support: Compatible with Gemini, OpenAI, Claude, DeepSeek, and OpenRouter.