CodeReviewGPT is a Python CLI that blends static analysis with optional LLM review to surface bugs, security risks, and maintainability issues.
flowchart TD
CLI[CLI Entry] --> CFG[Config Loader]
CFG --> ANA[Code Analyzer]
ANA --> INT[Internal Checks]
ANA --> TOOLS[Static Tools]
ANA -->|optional| LLM[LLM Review]
INT --> MERGE[Merge Findings]
TOOLS --> MERGE
LLM --> MERGE
MERGE --> OUT[Report Formatter]
OUT --> TERM[Terminal]
OUT --> MD[Markdown]
OUT --> JSON[JSON]
OUT --> HTML[HTML]
sequenceDiagram
participant User
participant CLI
participant Analyzer
participant Tools
participant LLM
participant Formatter
User->>CLI: codereview analyze path
CLI->>Analyzer: analyze_path()
Analyzer->>Tools: run static tools
Analyzer->>LLM: review_code() (optional)
Analyzer->>Formatter: render output
Formatter-->>User: report
- Scan a file or directory of Python sources
- Runs static tools (pylint, bandit, flake8, radon) if installed
- Runs internal checks (TODOs, long files/functions, missing docstrings)
- Optional LLM review (Claude/OpenAI) with JSON parsing
- Output formats: terminal, markdown, json, html
python -m venv .venv
. .venv/bin/activate
pip install -r requirements.txt
codereview analyze path/to/project --format markdown --output report.mdMakefile (Unix):
make install-dev
make testJustfile (PowerShell):
just install-dev
just testWindows helper:
scripts\\dev.cmd testcodereview config-example > config.json
codereview analyze path/to/project --config config.jsonOPENAI_API_KEYANTHROPIC_API_KEYCODEREVIEW_PROVIDERCODEREVIEW_SEVERITYCODEREVIEW_FORMAT
- Static tool integrations are best-effort; install tools you need.
- Use
--no-llmto disable LLM calls.