Package Exports
- coderev-cli
- coderev-cli/src/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (coderev-cli) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
coderev-cli
Multi-agent AI code review for git — parallel Security / Bug / Quality agents with confidence scoring.
Install
npm install -g coderev-cliQuick Start
# 1. init project config
coderev init
# 2. set API key (supports DeepSeek / OpenAI)
export DEEPSEEK_API_KEY="sk-xxx"
# 3. review staged changes
coderev review
# 4. or review a diff
git diff main | coderev review
# 5. or review a PR
coderev review --pr owner/repo#42Architecture
your code (git diff)
│
┌──────┼──────┐
▼ ▼ ▼
┌──────┐┌──────┐┌──────┐
│ 🔒 ││ 🐛 ││ 📐 │
│Security│ Bug │Quality│
│Auditor│Detector│ Check │
└──┬───┘└──┬───┘└──┬───┘
│ │ │
└───────┼───────┘
▼
┌──────────┐
│ merge & │
│confidence│
│ (0-100) │
└────┬─────┘
▼
structured report| Agent | Focus |
|---|---|
| 🔒 Security Audit | SQL injection, XSS, SSRF, hardcoded secrets, auth flaws |
| 🐛 Bug Detection | null pointers, race conditions, async issues, logic errors |
| 📐 Code Quality | complexity, DRY, naming, exception handling |
Every issue gets a confidence score (0–100); below threshold (default 60) is auto-filtered. Duplicates found by multiple agents are merged.
CLI Reference
review
coderev review # parallel agents (default)
coderev review --min-confidence 80 # higher bar, fewer false positives
coderev review --single # single agent mode (v0.2 compat, cheaper)
coderev review --audit # OWASP-level security focus
coderev review --no-cache # bypass cache
coderev review --format json # JSON outputfix
coderev fix --file changes.diff # auto-fix suggestions
coderev fix --file changes.diff --apply # generate & apply patchesPR review
coderev review --pr owner/repo#42 # review external PR
coderev review --pr 42 # auto-detect current repo
coderev review --pr owner/repo#42 --post # review + post comment
coderev review --pr owner/repo#42 --inline # inline code comments
coderev review --pr owner/repo#42 --format jsonhooks
coderev hook install # install pre-commit hook
coderev hook install pre-commit --min-score 70
coderev hook install pre-pushother
coderev stats # dashboard
coderev stats week # weekly stats
coderev cache status # cache info
coderev cache clear # clear cache
coderev config show # show configConfig
Create .coderevrc.json in project root:
{
"ai": {
"provider": "deepseek",
"model": "deepseek-chat",
"temperature": 0.3
},
"rules": {
"maxLineLength": 100,
"predefined": ["security", "performance", "style"],
"custom": [
{
"name": "no-console-log",
"severity": "warning",
"message": "avoid console.log in production code"
}
]
}
}Supports 8 built-in rule sets and language-specific rules for JS, TS, Python, Rust, Go, Java, SQL.
.coderevhint
Describe your project context. coderev reads it during review to tailor analysis. Compatible with CLAUDE.md.
Git Platform Support
| Platform | PR review | Comment posting |
|---|---|---|
| GitHub | ✅ | ✅ inline / summary |
| GitLab | ✅ | ✅ |
| Gitee | ✅ | ✅ |
| Bitbucket | ✅ | ✅ |
Caching
- SHA256-based diff hashing
- 24-hour TTL
coderev cache status/coderev cache clear
CI / GitHub Actions
Built-in workflow at .github/workflows/coderev-review.yml — auto-reviews every PR.
Project Structure
coderev/
├── src/
│ ├── cli.js # CLI entry
│ ├── reviewer.js # multi-agent review core
│ ├── config.js # config loader
│ ├── github.js # GitHub API
│ ├── gitlab.js # GitLab API
│ ├── gitee.js # Gitee API
│ ├── bitbucket.js # Bitbucket API
│ ├── cache.js # caching
│ ├── rules.js # rule engine
│ ├── stats.js # dashboard
│ └── coderev.test.js # 20 tests
├── .github/workflows/
├── .coderevrc.json
├── .coderevignore
└── .coderevhintLicense
MIT