Catalog PyPI
PACKAGE EXPLORERView in registry

ai-code-reviewer-cli

PyPI

AI-powered code review tool that reviews staged git changes using Groq

Versions collected1
Direct dependencies3From release 0.1.2
Last observed21 Oct, 10:13 UTC

README

Version 0.1.2 documentation

🤖 AI Code Reviewer — AI-Powered Git Diff Analysis

AI Code Reviewer is a CLI tool that reviews your staged git changes before you commit — catching bugs, unsafe patterns, and logic errors using an LLM, with built-in hallucination filtering so you only see findings that actually correspond to real lines in your diff.

PyPI Python Groq Publish to PyPI Stars Downloads


✨ Key Features

  • Reviews staged changes automatically — parses git diff --staged down to exact added lines and line numbers, not just raw diff text
  • Hallucination-checked output — every AI-generated comment is cross-validated against the real diff before being shown, so you never get a "bug" pointing at a line that doesn't exist
  • Severity-ranked, color-coded terminal output — critical issues in red, warnings in yellow, info in cyan, powered by rich
  • Pre-commit hook integration — can block a commit outright when a critical issue is found, enforced at the git level regardless of whether you commit from the terminal, VS Code, or any other tool
  • Fails safe — network errors or malformed AI responses never crash your workflow or silently block a commit

📦 Installation

pip install ai-code-reviewer-cli

You'll need a free Groq API key. Set it as a persistent environment variable (not a .env file — this needs to work from any project directory, not just one folder):

Windows:

setx GROQ_API_KEY "your-key-here"

macOS/Linux:

echo 'export GROQ_API_KEY="your-key-here"' >> ~/.zshrc  # or ~/.bashrc

🚀 Usage

git add your_file.py
ai-review

Example output:

[app.py:12] CRITICAL: Mutable default argument 'items=[]' can retain state across calls. [app.py:24] WARNING: Using 'is' for string comparison instead of '=='.


🔒 Pre-commit Hook (optional)

To block commits automatically when a critical issue is found, add a pre-commit hook to any repo that calls this tool's review pipeline and exits non-zero on critical findings. See hooks/pre_commit_check.py in this repo for a working example.


🛠️ Built With

  • Python — core CLI and diff-parsing logic
  • Groq (openai/gpt-oss-120b) — LLM-powered review generation
  • Rich — colored terminal output
  • python-dotenv — local development configuration
  • GitHub Actions + PyPI Trusted Publishing — fully automated, secretless release pipeline

📄 License

MIT


⭐ Support

If you find this project useful or interesting, consider giving it a star — it helps others discover it too.


👤 Author

Muhil (@muhilvannan16)

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.1.217 Aug 20263

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Metadata history

Meaningful changes
Current collected state Current

Observed since 21 Oct, 10:13 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:b584eab4a5b6cc335e1e377cc1b7460f5190148bd31bb7f3a29d6fad978b13a4