Skip to content
FS-YuaoPublic

About

Open Code Review CLI 配置与使用指南

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Open Code Review Setup

阿里巴巴开源 AI 代码审查工具的配置与使用指南

安装

npm install -g @alibaba-group/open-code-review

配置

# 运行配置向导
ocr config provider
ocr config model

# 或直接设置
ocr config set provider volcengine
ocr config set providers.volcengine.api_key "<你的火山方舟 API Key>"
ocr config set providers.volcengine.url "https://ark.cn-beijing.volces.com/api/coding/v1"
ocr config set model "ark-code-latest"

# 验证连接
ocr llm test

使用

增量审查(推荐)

# 审最新 commit
ocr review --commit HEAD

# 审工作区改动
git add <files>
ocr review

# 审分支改动
ocr review --from main --to feature

全量扫描(慎用,单文件约 100K-270K token)

ocr scan --path <file-or-dir> --format text

已知配置

  • Provider: volcengine(火山方舟)
  • Base URL: https://ark.cn-beijing.volces.com/api/coding/v1
  • Model: ark-code-latest(映射到 glm-5.2)
  • 协议: OpenAI 兼容

注意事项

  • API Key 是敏感信息,不要提交到代码仓库
  • 扫描模式(ocr scan)token 消耗较大,适合关键文件定点审查
  • 增量审查(ocr review)基于 git diff,token 消耗约 1/10

About

Open Code Review CLI 配置与使用指南

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors