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.