企业级开源AI 智能代码评审系统,一键部署,真正解决代码质量问题
📅 2026/7/7 2:34:36
👁️ 阅读次数
📝 编程学习
AI Code Review
开源企业级AI Code Review系统,支持 Claude、Codex 等主流模型,一键部署、开箱即用,自动代码审查,企业微信、邮件通知。
开源地址:https://github.com/743144627/ai-code-review.git
目录结构
backend/ FastAPI #后端 frontend/ Vue #管理后台 scripts/init_database.py requirements.txt #Python 依赖 Dockerfile #单镜像构建配置方式
业务配置只通过管理后台写入数据库,不再维护示例配置文件。
基础运行配置写在根目录 `config.ini`:
[database] host = 127.0.0.1 port = 3306 user = root password = name = ai_code_review [security] jwt_secret = change-this-jwt-secret crypto_secret = change-this-crypto-secret [admin] username = admin password = admin123 [ai_sdk] claude_base_url = https://aikopen.com/api/claudecode codex_base_url = https://aikopen.com/api/codex/v1项目只使用 MySQL。`security.crypto_secret` 用于加密数据库中的敏感业务配置,部署后不要随意更换。
初始化
pip install -r requirements.txt python scripts/init_database.py初始化脚本只负责创建数据库表和默认管理员账号,不做任何历史数据或配置迁移。
本地运行
cd frontend npm install npm run build rm -rf ../backend/static cp -R dist ../backend/static cd .. uvicorn backend.main:app --host 0.0.0.0 --port 8000访问 `http://localhost:8000/` 登录管理后台,在后台完成业务配置。GitLab Webhook 地址为 `http://localhost:8000/gitlab/webhook`。
## Docker
docker build -t ai-code-review . docker run --rm -p 8000:8000 ai-code-reviewAI审核结果通知企业微信示例(如果没有企业微信可以设置邮箱方式):
编程学习
技术分享
实战经验