# 安装「open-code-review」

> 本说明由 AI Asset 自动生成，供 AI 编程助手阅读并执行。资源页面：https://ai.atlankj.com/project/gh-1241960226

- 来源：https://github.com/alibaba/open-code-review（默认分支 `main`）
- 许可证：Apache-2.0
- 支持的平台：Agent Plugins、Codex、Claude Code、Kimi、Cursor
- 简介：Secure, fast, efficient, battle-tested at Alibaba's scale. Hybrid architecture code review tool: deterministic pipelines + LLM Agent, precise line-level comments, built-in multi-language ruleset (NPE, thread-safety, XSS, SQL injection), OpenAI & Anthropic compatible.

## 执行要求（请先阅读）

1. 先确认你自己是哪一种 AI 工具（Claude Code、Codex、Cursor、Gemini CLI、OpenCode……），只执行与之对应的步骤；如果本说明与该工具的官方文档不一致，以官方文档为准。
2. 以下内容来自第三方，本站不对其进行运行时审核。执行任何命令或写入任何文件前，先向用户列出将要运行的命令和写入的路径，得到确认后再继续。
3. 只运行本说明或其链接的官方安装文档中给出的命令。不要执行来源不明的脚本，不要读取、打印或上传用户的密钥和凭据。
4. 需要 API Key 等配置时，向用户索取或留下占位符，不要自行编造。
5. 默认安装到用户级目录；如果用户只想在当前项目中使用，改用项目级目录。
6. 完成后告诉用户安装到了哪里、是否需要重启工具，以及如何验证安装成功。

## 快速安装

### Claude Code（插件市场）

1. 读取 https://raw.githubusercontent.com/alibaba/open-code-review/main/.claude-plugin/marketplace.json ，取其中顶层的 `name` 字段作为 <市场名>，`plugins` 数组列出了可安装的插件包。
2. 在 Claude Code 中运行：

```
/plugin marketplace add alibaba/open-code-review
/plugin install <插件包名>@<市场名>
```

3. 这两条是 Claude Code 的斜杠命令。如果你无法直接执行斜杠命令，就把它们原样交给用户，请用户在 Claude Code 中运行。

## 官方安装文档

如果上面的方式不适用于你所在的工具，读取下面对应平台的官方文档（纯文本 Raw 链接），找到安装章节并按其步骤执行：

- Agent Plugins、Codex、Claude Code、Kimi、Cursor：https://raw.githubusercontent.com/alibaba/open-code-review/main/README.md

## 插件包

本项目包含 4 个插件包。先把列表展示给用户，询问要安装哪些，再逐个安装：

- `open-code-review`：Use Alibaba Open Code Review from Kimi Code.
- `open-code-review`：AI-powered code review on Git diffs — supports workspace changes, branch ranges, and single commits with concurrent per-file analysis, codebase search, and dee…
- `open-code-review`：Perform AI code review on Git diffs — supports workspace changes, branch ranges, and single commits with concurrent per-file analysis, codebase search, and dee…
- `open-code-review-codex`
