codereviewer.ai - AI-powered code review tool for developers
npm install codereviewerai
██████╗ ██████╗ ██████╗ ███████╗██████╗ ███████╗██╗ ██╗██╗███████╗██╗ ██╗███████╗██████╗
██╔════╝██╔═══██╗██╔══██╗██╔════╝██╔══██╗██╔════╝██║ ██║██║██╔════╝██║ ██║██╔════╝██╔══██╗
██║ ██║ ██║██║ ██║█████╗ ██████╔╝█████╗ ██║ ██║██║█████╗ ██║ █╗ ██║█████╗ ██████╔╝
██║ ██║ ██║██║ ██║██╔══╝ ██╔══██╗██╔══╝ ╚██╗ ██╔╝██║██╔══╝ ██║███╗██║██╔══╝ ██╔══██╗
╚██████╗╚██████╔╝██████╔╝███████╗██║ ██║███████╗ ╚████╔╝ ██║███████╗╚███╔███╔╝███████╗██║ ██║
╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝╚══════╝ ╚═══╝ ╚═╝╚══════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝.ai
bash
1. Clone or create project directory
mkdir codereview
cd codereview
2. Initialize npm project
npm init -y
3. Install dependencies
npm install commander inquirer@9.2.12 chalk@4.1.2 chalk-animation figlet gradient-string chokidar simple-git axios dotenv conf@11.0.2 ora@5.4.1 boxen@5.1.2 cli-table3 nanospinner
4. Install dev dependencies
npm install -D typescript @types/node @types/figlet @types/gradient-string ts-node
5. Copy all source files to respective directories
Copy package.json, tsconfig.json
Copy src/ directory with all files
6. Build the project
npm run build
7. Link globally (for development)
npm link
OR install globally after publishing
npm install -g codereview
`
🎯 Quick Start
$3
`bash
Run the configuration wizard
awd config
Or use long form
awesomediagns config
`
Follow the interactive prompts to:
1. Select your AI provider (Gemini/Claude/OpenAI)
2. Enter your API key
3. Choose your preferred model
4. Set review mode (Auto/Manual)
5. Configure advanced settings
$3
`bash
Navigate to your project
cd my-project
Initialize AwesomeDiagns
awd init
`
$3
`bash
Review a specific file
awd review src/index.js
Review all modified files
awd review
Review staged files (git)
awd review --staged
Review all files in project
awd review --all
`
$3
`bash
Start watching files
awd watch
Files will be automatically reviewed on save
Press Ctrl+C to stop
`
$3
`bash
Start chat mode
awd chat
Ask questions like:
"How can I optimize this function?"
"What's the best way to handle errors in async functions?"
"Review my recent changes"
`
📋 All Commands
`bash
awd # Show home screen
awd init # Initialize in current project
awd config # Run configuration wizard
awd config --show # Show current configuration
awd config --provider # Change AI provider
awd config --mode # Change review mode
awd review [file] # Review file(s)
awd review --all # Review all project files
awd review --staged # Review staged git files
awd watch # Start auto-review mode
awd chat # Interactive chat with AI
awd status # Show configuration status
awd history # View review history
awd history --clear # Clear history
awd help # Show all commands
`
🔧 Configuration
$3
Stored in: ~/.config/awesomediagns/config.json
Contains:
- AI provider settings
- API keys
- Review preferences
- Mode settings
$3
Stored in: .awesomediagns/config.json in your project
Contains:
- Watched file patterns
- Ignore patterns
- Git settings
- Project-specific settings
$3
#### Google Gemini
1. Visit: https://makersuite.google.com/app/apikey
2. Create API key
3. Free tier available!
#### Anthropic Claude
1. Visit: https://console.anthropic.com/
2. Create account and get API key
3. Requires payment method
#### OpenAI
1. Visit: https://platform.openai.com/api-keys
2. Create API key
3. Requires payment method
📁 Project Structure
`
my-project/
├── .awesomediagns/
│ ├── config.json # Project config
│ └── history/
│ ├── reviews.json # Review history
│ └── chat.json # Chat history
├── src/
└── ...
`
🎨 Customization
$3
Edit .awesomediagns/config.json:
`json
{
"watchedFiles": [
"*/.js",
"*/.ts",
"*/.jsx",
"*/.tsx",
"*/.py"
],
"ignoredPatterns": [
"node_modules/**",
"dist/**",
"build/**"
]
}
`
$3
- Quick: Fast scan, critical issues only
- Standard: Balanced review (recommended)
- Deep: Thorough analysis with security, performance, architecture
$3
Configure delay (1-30 seconds) before auto-review triggers after file save.
🔒 Privacy & Security
- API keys stored locally in config files
- Code is sent to AI providers for review
- Conversation history stored locally
- No data sent to AwesomeDiagns servers (we don't have any!)
🐛 Troubleshooting
$3
`bash
Reconfigure provider
awd config --provider
`
$3
`bash
Re-run init
awd init
`
$3
`bash
awd config --reset
awd history --clear
`
📝 Examples
$3
`
╭──────────────────────────────────────────╮
│ 📋 Code Review: index.js │
│ │
│ Summary: │
│ Good code structure. Found 2 issues │
│ and 3 optimization opportunities. │
│ │
│ 🐛 Issues Found: │
│ 1. Missing error handling │
│ Line 42 │
│ 💡 Add try-catch block │
│ │
│ ⚡ Optimizations: │
│ 1. Use async/await instead of .then() │
│ 2. Cache API responses │
│ │
│ Score: 8/10 │
╰──────────────────────────────────────────╯
``