gemini-pr-review-assistant
v2.3.0
Published
AI-powered PR review and analysis using Gemini CLI
Maintainers
Readme
🔍 Gemini PR Review Assistant
AI-powered pull request review and analysis using Gemini CLI
📖 Overview
Gemini PR Review Assistant is a command-line tool that leverages Google's Gemini AI to provide comprehensive pull request reviews. It analyzes code changes, identifies potential issues, and provides detailed feedback on security, performance, code quality, and best practices.
✨ Features
- 🤖 AI-Powered Reviews: Uses Gemini 2.5 Flash for intelligent code analysis
- 🔗 GitHub PR Integration: Automatically detects and analyzes actual pull requests
- 💬 PR Comment Integration: Posts review results directly as PR comments
- 🔒 Security Analysis: Identifies potential security vulnerabilities
- ⚡ Performance Insights: Highlights performance issues and optimization opportunities
- 🎯 Code Quality Assessment: Evaluates code structure, readability, and maintainability
- 🌐 Multi-language Support: Korean and English UI/review messages
- 📊 Comprehensive Analysis: Reviews commit history, file changes, and code diffs
- 🎨 Beautiful CLI: Clean, colorful output with loading animations
🚀 Installation
Prerequisites
All of the following are required:
- Node.js (>=16.0.0)
- GitHub CLI - Install and authenticate:
brew install gh # macOS # Visit https://cli.github.com for other platforms gh auth login # Authenticate with GitHub (required) - Gemini CLI - Install and authenticate:
npm install -g @google/gemini-cli gemini # Follow authentication prompts
Install PR Review Assistant
npm install -g gemini-pr-review-assistant📋 Usage
Basic Commands
# Review current branch against main
aipr
# Review specific branch
aipr feature/login
# Compare with specific base branch
aipr --diff develop
# Review and post comment to PR
aipr --post-comment
# Configure language settings
aipr --configure
# Show help
aipr --helpExamples
# Review current branch changes
aipr
# Review feature branch against main
aipr feature/user-auth
# Compare current branch with develop
aipr --diff develop
# Review and automatically post to PR
aipr --post-comment
# Review specific branch and post comment
aipr feature/payments --post-comment🎯 Review Categories
The AI provides analysis in these key areas:
🔒 Security Issues
- Authentication and authorization flaws
- Input validation problems
- Data exposure risks
- Injection vulnerabilities
⚡ Performance Issues
- Inefficient algorithms
- Memory leaks
- Database query optimization
- Bundle size concerns
✨ Code Quality
- Code structure and organization
- Readability and maintainability
- Error handling
- Documentation quality
💡 Best Practices
- Coding standards compliance
- Design patterns usage
- Testing coverage
- Configuration management
⚙️ Configuration
On first run, you'll be prompted to select your preferred language:
- Korean (한국어): Korean UI and review messages
- English: English UI and review messages
You can change this anytime with:
aipr --configureConfiguration is stored in ~/.gemini-pr-review-config.json
📁 Project Structure
gemini-pr-review-assistant/
├── bin/
│ ├── aipr # Main executable script
│ └── postinstall.js # Setup script
├── package.json
├── README.md
└── LICENSE🔧 Development
Local Development
- Clone the repository
- Install dependencies:
npm install - Make script executable:
chmod +x bin/aipr - Link globally:
npm link
Testing
# Test in a git repository
cd /path/to/your/project
aipr --help
aipr🤝 Contributing
- Fork the repository
- Create a feature branch:
git checkout -b feature/new-feature - Make your changes
- Test thoroughly
- Submit a pull request
📄 License
MIT License - see LICENSE file for details.
🙏 Acknowledgments
- Built with Google Gemini CLI
- Inspired by gemini-commit-assistant
🐛 Issues & Support
If you encounter any issues or have suggestions:
- Check existing issues
- Create a new issue with detailed information
- Include your environment details and error messages
Happy Reviewing! 🎉
