ReviewBot is a powerful, locally-hosted tool that leverages Large Language Models (LLMs) to provide intelligent, automated code reviews for your Pull Requests. It supports GitCode and GitHub, integrating seamlessly into your workflow to catch bugs, improve code quality, and ensure best practices.
- Multi-Platform Support: Seamlessly review PRs/MRs from GitCode and GitHub.
- AI-Powered Analysis: Utilizes advanced LLMs (Volcengine Ark/Doubao, OpenAI GPT-4) to deeply analyze code changes.
- Smart Feedback: Provides structured feedback including:
- summary of changes
- Potential bugs & security risks
- Code improvement suggestions (Clean Code, SOLID)
- Code quality score
- Interactive Dashboard: A modern, responsive React UI to manage reviews, configure settings, and view history.
- Configurable Prompts: Customize the AI's persona and review instructions directly from the UI.
- Privacy-Focused: Runs locally on your machine. Your API keys and data stay with you.
- Python 3.9+
- Node.js 16+ & npm
- Git
-
Clone the repository:
git clone https://github.com/yourusername/reviewbot.git cd reviewbot -
Start the Application: The project includes a convenient startup script that sets up both the backend (Python/FastAPI) and frontend (React/Vite) environments automatically.
./start.sh
First run may take a few minutes to install dependencies.
-
Access the Dashboard: Open your browser to: http://localhost:3101
You can configure ReviewBot via the Settings button in the web interface, or manually via the .env file.
- Click Settings (top right).
- General Tab: Enter your API Keys (GitCode/GitHub) and choose your AI Provider (Volcengine/OpenAI).
- Prompts Tab: Customize the "System Prompt" to change how the AI reviews your code (e.g., "Be very strict about variable naming").
Copy the example file and edit it:
cp backend/.env.example backend/.env
vi backend/.env| Variable | Description |
|---|---|
GITCODE_ACCESS_TOKEN |
Personal Access Token for GitCode. |
GITHUB_ACCESS_TOKEN |
Personal Access Token for GitHub. |
AI_PROVIDER |
volcengine or openai. |
VOLC_API_KEY |
Volcengine Ark API Key. |
VOLC_MODEL |
Volcengine Endpoint ID (e.g., ep-2024...). |
OPENAI_API_KEY |
OpenAI API Key. |
- Copy a PR URL:
- GitCode:
https://gitcode.com/owner/repo/pull/123 - GitHub:
https://github.com/owner/repo/pull/456
- GitCode:
- Paste & Review: Paste the URL into the dashboard and click Start AI Review.
- View Results: The AI's analysis will appear on the right.
- History: Previous reviews are saved automatically. Click the trash icon to delete them.
To stop both backend and frontend processes:
./stop.shContributions are welcome! Please feel free to submit a Pull Request.