{"_id":"@dext7r/ai-code-reviewer","name":"@dext7r/ai-code-reviewer","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@dext7r/ai-code-reviewer","type":"module","version":"0.1.0","private":false,"packageManager":"pnpm@10.6.2","description":"一个用于GitLab/GitHub或通用代码托管平台的自动化代码审查工具","author":{"name":"h7ml","email":"h7ml@qq.com","url":"https://github.com/h7ml"},"license":"MIT","homepage":"https://github.com/h7ml/ai-code-reviewer#readme","repository":{"type":"git","url":"git+https://github.com/h7ml/ai-code-reviewer.git"},"bugs":{"url":"https://github.com/h7ml/ai-code-reviewer/issues"},"keywords":["code-review","ai","automation","gitlab","github","openai","ollama"],"sideEffects":false,"exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs"},"./package.json":"./package.json"},"main":"./dist/index.mjs","module":"./dist/index.mjs","types":"./dist/index.d.mts","bin":{"reviewer":"dist/cli.mjs","ai-reviewer":"dist/cli.mjs","ai-code-reviewer":"dist/cli.mjs"},"scripts":{"build":"unbuild","dev":"unbuild --stub","lint":"eslint .","lint:fix":"eslint . --fix","prepublishOnly":"nr build","release":"bumpp && pnpm publish","start":"tsx src/index.ts","cli":"tsx src/cli.ts","test":"vitest","typecheck":"tsc --noEmit","prepare":"simple-git-hooks"},"dependencies":{"cac":"^6.7.14","chalk":"^5.3.0","consola":"^3.2.3","cross-fetch":"^4.0.0","dotenv":"^16.3.1","openai":"^4.24.1","yaml":"^2.3.4"},"devDependencies":{"@antfu/eslint-config":"^2.6.1","@antfu/ni":"^0.21.12","@antfu/utils":"^0.7.6","@types/node":"^20.10.5","bumpp":"^9.2.0","eslint":"^8.56.0","fast-glob":"^3.3.2","lint-staged":"^15.2.0","simple-git-hooks":"^2.9.0","tinyexec":"^1.0.0","tsx":"^4.7.0","typescript":"^5.3.3","unbuild":"^2.0.0","vite":"^5.0.10","vitest":"^1.0.4","vitest-package-exports":"^0.1.1"},"simple-git-hooks":{"pre-commit":"pnpm i --frozen-lockfile --ignore-scripts --offline && npx lint-staged"},"lint-staged":{"*.{js,jsx,ts,tsx,mjs,cjs}":"eslint --fix --cache","*.json":"eslint --fix --cache"},"_id":"@dext7r/ai-code-reviewer@0.1.0","gitHead":"a30a1913d90e464ac670e1450d89aa2e869ee562","_nodeVersion":"20.19.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-U/2zlp465RPkYt7LDWUa+t2y4CeOeKLqpQBzsWWCrJHzLC0ljqBkSQC3LEnO+mt3KJo2ggNuZ+BxaAudZrrqNw==","shasum":"60d87becb7ee1deaeae5596e35c65b55e4a18bf7","tarball":"https://registry.npmjs.org/@dext7r/ai-code-reviewer/-/ai-code-reviewer-0.1.0.tgz","fileCount":61,"unpackedSize":88039,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCaFTXl2e4G309+Q8SZmnphTmf8/8brq++yugqq8LoQawIhAMnx4X9cTkg1P1rNWKCevhbKa5rGqxttJLV7ClCgSUBX"}]},"_npmUser":{"name":"h7ml","email":"h7ml@qq.com"},"directories":{},"maintainers":[{"name":"h7ml","email":"h7ml@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ai-code-reviewer_0.1.0_1743076112682_0.18058043241699395"},"_hasShrinkwrap":false}},"time":{"created":"2025-03-27T11:48:32.565Z","0.1.0":"2025-03-27T11:48:32.915Z","modified":"2025-03-27T11:48:33.272Z"},"maintainers":[{"name":"h7ml","email":"h7ml@qq.com"}],"description":"一个用于GitLab/GitHub或通用代码托管平台的自动化代码审查工具","homepage":"https://github.com/h7ml/ai-code-reviewer#readme","keywords":["code-review","ai","automation","gitlab","github","openai","ollama"],"repository":{"type":"git","url":"git+https://github.com/h7ml/ai-code-reviewer.git"},"author":{"name":"h7ml","email":"h7ml@qq.com","url":"https://github.com/h7ml"},"bugs":{"url":"https://github.com/h7ml/ai-code-reviewer/issues"},"license":"MIT","readme":"# AI Code Reviewer\n\n[![npm version][npm-version-src]][npm-version-href]\n[![npm downloads][npm-downloads-src]][npm-downloads-href]\n[![License][license-src]][license-href]\n\n一个用于GitLab/GitHub或通用代码托管平台的自动化代码审查工具，旨在提升代码质量，提供智能反馈，并通过灵活配置实现高效的审查流程。\n\n## 特性\n\n- 🤖 **自动代码审查**: 对合并请求和提交进行自动化审查，提供差异分析\n- 🧠 **智能反馈**: 通过AI模型提供代码质量评估、最佳实践建议和性能优化建议\n- 🔔 **通知集成**: 支持通过GitLab评论和企业微信进行通知\n- ⚙️ **灵活配置**: 支持多种AI模型和自定义审查规则，管理配置优先级\n\n## 安装\n\n```bash\n# 全局安装\nnpm install -g @dext7r/ai-code-reviewer\n\n# 或使用pnpm\npnpm add -g @dext7r/ai-code-reviewer\n\n# 或使用yarn\nyarn global add @dext7r/ai-code-reviewer\n```\n\n## 配置\n\n在项目根目录创建 `.aireviewrc.yml` 文件：\n\n```yaml\n# AI模型配置\nai:\n  provider: openai # 或 ollama\n  model: gpt-4 # 或其他模型\n\n# 平台配置\nplatform:\n  type: gitlab # 或 github\n  token: YOUR_TOKEN\n\n# 通知配置\nnotifications:\n  gitlab_comment: true\n  wecom:\n    enabled: false\n    webhook: YOUR_WEBHOOK_URL\n```\n\n或使用环境变量：\n\n```bash\nexport AI_REVIEWER_OPENAI_KEY=your_openai_key\nexport AI_REVIEWER_GITLAB_TOKEN=your_gitlab_token\n```\n\n## 使用方法\n\n### CLI命令\n\n```bash\n# 审查GitLab合并请求\nai-review gitlab-mr --project-id 123 --mr-id 456\n\n# 审查GitHub拉取请求\nai-review github-pr --owner user --repo project --pr-id 123\n\n# 审查本地代码\nai-review local --path ./src\n```\n\n## 许可证\n\n[MIT](./LICENSE) License\n\n<!-- Badges -->\n[npm-version-src]: https://img.shields.io/npm/v/@dext7r/ai-code-reviewer?style=flat&colorA=080f12&colorB=1fa669\n[npm-version-href]: https://npmjs.com/package/@dext7r/ai-code-reviewer\n[npm-downloads-src]: https://img.shields.io/npm/dm/@dext7r/ai-code-reviewer?style=flat&colorA=080f12&colorB=1fa669\n[npm-downloads-href]: https://npmjs.com/package/@dext7r/ai-code-reviewer\n[license-src]: https://img.shields.io/github/license/h7ml/ai-code-reviewer.svg?style=flat&colorA=080f12&colorB=1fa669\n[license-href]: https://github.com/h7ml/ai-code-reviewer/blob/main/LICENSE\n","readmeFilename":"README.md","_rev":"1-15de561b579988fba42cf8495baa2c0c"}