Skip to content

Repository files navigation

🤖 AI-Reviewer

AI-powered code review, fully local. No cloud, no credentials, no compromise. TypeScript + Ollama, 30+ languages, seamless Git integration, multiple analysis modes.

License: MITNode.jsTypeScript

✨ Features

  • 🔒 100% Private - Your code never leaves your machine
  • Lightning Fast - Local AI analysis with Ollama
  • 🎯 Smart Git Integration - Multiple analysis modes
  • 🛡️ Security Focused - Detects vulnerabilities & issues
  • 📊 Detailed Reports - Line-by-line feedback with scoring

🚀 Quick Start

Install Ollama

curl -fsSL https://ollama.ai/install.sh | sh
ollama pull codellama:7b-instruct

Install AI-Reviewer

git clone https://github.com/NeaByteLab/AI-Reviewer.git
cd AI-Reviewer
npm install && npm run build

Basic Usage

# Analyze changes from main branch
npm start analyze
# Analyze current git diff
npm start analyze --diff
# Analyze specific commit
npm start analyze --commit abc123
# Compare branches
npm start analyze --custom-branch feature/new

🎯 Analysis Modes

  • Branch Comparison (default) - Compare with main branch
  • Git Diff (--diff) - Analyze staged + unstaged changes
  • Commit Analysis (--commit) - Analyze specific commit
  • Custom Branch (--custom-branch) - Compare any two branches

⚙️ Configuration

Create .env file:

OLLAMA_BASE_URL=http://localhost:11434
OLLAMA_MODEL=codellama:7b-instruct
OLLAMA_TIMEOUT=30000
LOG_LEVEL=info

🔧 Commands

ai-reviewer analyze [options] [path] # Main analysis
ai-reviewer health # Check Ollama status
ai-reviewer examples # Show usage examples

Options

-b, --base-branch <branch># Base branch (default: main)
-m, --model <model># Ollama model to use
-o, --output <file># Save results to JSON
-v, --verbose # Show detailed output
--max-files <number># Max files (default: 20)
-c, --commit <hash># Analyze specific commit
-d, --diff # Analyze current git diff
--custom-branch <branch># Compare with custom branch

🌍 Supported Languages

JavaScript/TypeScript, Python, Java, C/C++, C#, PHP, Ruby, Go, Rust, Swift, Kotlin, Scala, Shell, SQL, HTML/CSS, Vue, Svelte, and more.


🤖 Recommended Models

  • Lightweight: codellama:7b-instruct, deepseek-coder:6.7b-instruct
  • Balanced: codellama:13b-instruct, starcoder2:15b
  • Powerful: codellama:34b-instruct, deepseek-coder:33b-instruct

📄 License

MIT License - see LICENSE file for details.

About

AI-powered code review that runs entirely on your machine. No cloud, no credentials, no compromise. TypeScript + Ollama, 30+ languages, seamless Git integration, multiple analysis modes.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Contributors

Languages