Easy-AI-CodeReview  by spherical-up

Automated code review powered by large language models

Created 6 months ago
258 stars

Top 98.1% on SourcePulse

GitHubView on GitHub
Project Summary

This project provides an automated code review tool leveraging large language models (LLMs) to enhance code quality and streamline team collaboration. It targets developers and teams seeking to improve code review efficiency, reduce communication overhead, and catch potential issues early in the development cycle. The tool integrates with Git platforms like GitLab, offering intelligent analysis, customizable review styles, and real-time notifications.

How It Works

The system operates via GitLab webhooks, triggered by push events or merge request creations/updates. Upon receiving an event, it parses code changes and submits them to an integrated LLM for static analysis. This analysis covers code standards, potential bugs, security vulnerabilities, and maintainability suggestions. Review results are automatically posted as comments back to the relevant GitLab MR or commit. Additionally, scheduled tasks can process commit logs to generate daily development reports and provide dashboard visualizations of review data.

Quick Start & Requirements

  • Installation: Supports Docker Compose (docker-compose up -d) or local Python environment (pip install -r requirements.txt, then run api.py and ui.py). Python 3.10+ is recommended for local installs.
  • Prerequisites:
    • LLM API Key (e.g., DeepSeek, OpenAI, ZhipuAI) configured via .env file.
    • GitLab Personal or Project Access Token for webhook authentication.
    • Network access from GitLab to the deployed server (e.g., http://your-server-ip:5001).
    • Optional: DingTalk, WeChat Work, or Feishu webhook URLs for notifications.
  • Configuration: Requires editing a .env file (conf/.env.dist copied to conf/.env) to set LLM provider, API keys, supported file extensions, and notification webhook URLs.
  • GitLab Setup: Configure a webhook in GitLab project settings pointing to http://your-server-ip:5001/review/webhook, triggering on 'Push Events' and 'Merge Request Events'.
  • Resources: Requires a server accessible by GitLab, with ports 5001 (API) and 5002 (Dashboard) open.
  • Links: Project Repository, FAQ.

Highlighted Details

  • Multi-LLM Support: Flexible integration with various LLM providers including DeepSeek, ZhipuAI, OpenAI, Tongyi Qianwen, and Ollama.
  • Customizable Review Styles: Offers distinct review tones: Professional, Sarcastic, Gentleman, and Humorous.
  • Real-time Notifications: Pushes review results instantly to DingTalk, WeChat Work, or Feishu.
  • Automated Reporting: Generates daily development reports based on commit history and provides a dashboard for project/member statistics.

Maintenance & Community

Information regarding maintainers, community channels (like Discord/Slack), or a public roadmap is not detailed in the provided README.

Licensing & Compatibility

The README does not specify a software license. Users should verify licensing terms before adoption, especially concerning commercial use or integration into proprietary systems.

Limitations & Caveats

The feature for reviewing an entire codebase via a command-line tool (python -m biz.cmd.review) is noted as being under active development. Network accessibility from GitLab to the deployed service is a critical requirement.

Health Check
Last Commit

1 day ago

Responsiveness

Inactive

Pull Requests (30d)
2
Issues (30d)
1
Star History
8 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.