Local-first, context-aware AI code reviewer powered by LlamaIndex + Groq.
Works with any language — TypeScript, Python, Rust, Go, you name it.
- Local Vector Index — Embeddings stored locally, no external DB
- Gemini Embeddings — Free tier friendly, no OpenAI key needed
- Chunked Reviews — Handles large diffs without rate limits
- Detective Engine — Deterministic checks for common issues
- Dashboard Output — Professional review reports with fix prompts
- Global CLI — Install once, use in any project
# Install globally
npm install -g jstar-reviewer
# In any project directory:
jstar setup # Create config files
jstar init # Index the codebase
jstar review # Review staged changescurl -fsSL https://raw.githubusercontent.com/JStaRFilms/jstar-code-review/v2.0.0/setup.js | node- Check Config: The tool now auto-creates
.env.exampleand.jstar/when you run it. - Add Keys: Copy
.env.example→.env.localand add yourGEMINI_API_KEYandGROQ_API_KEY. - Index: Run
jstar init(orpnpm run index:init) to build the brain. - Review: Stage changes (
git add) and runjstar review(orpnpm run review).
For a detailed walkthrough, see ONBOARDING.md.
git diff --staged
│
▼
┌──────────────────┐
│ Detective │ ← Static analysis (secrets, console.log, "use client")
│ Engine │
└────────┬─────────┘
│
▼
┌──────────────────┐
│ Local Brain │ ← Gemini embeddings via LlamaIndex
│ (Retrieval) │
└────────┬─────────┘
│
▼
┌──────────────────┐
│ Chunked Review │ ← Splits diff by file, delays between calls
│ Queue │
└────────┬─────────┘
│
▼
┌──────────────────┐
│ Groq LLM │ ← moonshotai/kimi-k2-instruct-0905
│ (The Judge) │
└────────┬─────────┘
│
▼
📝 Review Report
pnpm installCreate .env.local:
GEMINI_API_KEY=your_gemini_key
GROQ_API_KEY=your_groq_keypnpm run index:initgit add <files>
pnpm run reviewscripts/
├── indexer.ts # Scans codebase, builds vector index
├── reviewer.ts # Orchestrates review pipeline
├── detective.ts # Static analysis engine
├── gemini-embedding.ts # Google Gemini adapter
└── mock-llm.ts # LlamaIndex compatibility stub
.jstar/
└── storage/ # Persisted embeddings (gitignored)
docs/features/
├── architecture-v2.md # Full architecture docs
├── detective.md # Static analysis rules
├── analyst.md # LLM reviewer (The Judge)
└── ...
Edit scripts/reviewer.ts:
const MODEL_NAME = "moonshotai/kimi-k2-instruct-0905";
const MAX_TOKENS_PER_REQUEST = 8000;
const DELAY_BETWEEN_CHUNKS_MS = 2000;Built with ⚡ by J Star Studios