Quickstart
Run your first review in five minutes.
Install
ocra is not published to npm yet. Install it from source (requires Node.js 22+ and Git):
git clone https://github.com/jma49/Open-CR-Agent.git
cd Open-CR-Agent
npm install
npm run build
npm link --workspace @open-cr-agent/cli
ocra --versionSee Installation for details.
Add a model key
ocra runs reviews through OpenCode, so any provider OpenCode supports works. For Google Gemini:
export GEMINI_API_KEY="your-key"Keep keys in your shell profile or a secret store, never in a repository.
Choose models
Create .ocra/config.json in the repository you want to review:
{
"models": {
"standard": ["google/gemini-3.5-flash", "google/gemini-flash-lite-latest"],
"light": "google/gemini-flash-lite-latest"
}
}standard models review code; light models do cheap helper work such as grouping files. A list is a failback chain.
Review
cd your-repository
ocra review # uncommitted changes, including untracked files
ocra review --from main # this branch since it diverged from main
ocra review --commit HEAD # a single commitocra prints progress while it works, then the verdict and a report grouped by file. Each finding says whether verification confirmed it and carries an id for ocra memory:
Review: Working tree changes
Risk tier: lite · 2 reviewed · 0 failed · 0 excluded
Verdict: approved with comments
1 finding(s): 0 critical, 1 warning, 0 suggestion.
src/list.ts
warning L4 lastItems returns n + 1 items [verified] #3f9a1c2e
slice(list.length - n - 1) starts one element too early.
Suggestion: return list.slice(-n);
1 finding(s) (0 critical, 1 warning, 0 suggestion) · tokens: 8023 in (0 cached), 285 out, 0 reasoning · $0.0031
Session: .ocra/sessions/20260924T225539Z-aa9790The exit code is 1 when a critical finding was confirmed by verification. Treat it as advice for reviewers rather than a security gate: the models read the change and can be misled by it. See the CLI reference.