🤖 AI驱动的智能代码审查工具 - 让AI成为你的代码质量守护者!支持Git/SVN,集成hooks自动化,提供专业级代码分析和反馈,提升代码质量,降低bug风险。
自动审查所有git add的文件
使用步骤
1. 安装 Node.js
确保安装 Node.js >= 18 版本
2. 初始化配置
ai-codereview init-config 或者 npx @x648525845/ai-codereview init-config
编辑生成的配置文件,填入你的API密钥(推荐使用DeepSeek)
3. 执行代码审查
# 直接运行
npx @x648525845/ai-codereview
# 或全局安装后使用
npm install -g @x648525845/ai-codereview
ai-codereview
4. 集成Git Hooks(可选)
# 使用Husky管理hooks
npm install --save-dev husky
npx husky install
npx husky add .husky/pre-commit "npx @x648525845/ai-codereview"
完成!每次提交代码时AI会自动审查,发现问题会阻止提交,确保代码质量。