Skip to content
codecoradevPublic

About

CLI-first AI code review — BYOK, diff/scan/branch, pre-commit hooks. 100% open source (MIT).

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

31 stars

Watchers

0 watching

Forks

CodeCora

AI-Powered Code Review CLI — BYOK

GitHub stars CI Crates.io License: Apache-2.0 Rust


Cora is a fast, native CLI for AI-powered code review and code intelligence — in your terminal, CI/CD, git hooks, or directly inside AI coding agents. Bring your own key, pick any model, index your codebase, and search it by meaning. All local, zero cloud.

Terminal, git hooks, CI and AI coding agents call cora, which runs a local code index, deterministic checks and a judge (your model or your agent) and returns review findings, a CI verdict and code search.

Quick start · What you get · CI/CD · Commands · Performance · Documentation

Quick Start

From nothing to a first review in three commands:

curl -fsSL https://raw.githubusercontent.com/codecoradev/cora-code/main/install.sh | sh   # 1. install
cora auth login                                                                           # 2. add your key (or skip it, see below)
cora review                                                                               # 3. review your staged changes

1. Install

Pick one install method — mixing channels can leave stale binaries on your PATH.

Method When to use
curl … install.sh (recommended) Standalone install; fetches the latest GitHub release binary and verifies it
cargo install cora-code You already have a Rust toolchain; builds from source (no bundled model)
Pre-built binaries Manual download from Releases

Pin a version: curl -fsSL https://raw.githubusercontent.com/codecoradev/cora-code/main/install.sh | CORA_VERSION=v0.21.1 sh. The installer verifies the SHA-256 checksum (and the Sigstore signature when cosign is installed).

AI agents and CI: install the release binary, do not build it from source: only the release binary contains the model and works offline.

The code model. Release binaries (the installer, cora upgrade, the archives on the Releases page) already contain the 33.5 MB potion-code-16M-v2 model, so semantic search works right after the download, offline included; the first use unpacks it into the data directory. A cargo install build does not carry it (the crates.io size limit is 10 MB) and downloads it once on first use.

Upgrade, check which cora you run, macOS Gatekeeper

Upgrading: run cora upgrade (downloads the latest release, verifies its SHA-256 checksum and, when cosign is installed, its Sigstore signature, replaces the binary) or cora upgrade --check to just see if one is available. If you installed via cargo install --path ., re-run that instead.

Verify which cora you're running — which -a cora will reveal stale copies from other channels:

which -a cora            # list every `cora` on your PATH (one entry = healthy)
cora --version           # should match the latest release

If which -a cora shows more than one path (e.g. ~/.local/bin/cora and ~/.cargo/bin/cora), remove the one you don't want or reorder your PATH. See Issue #314 for background.

macOS: binary killed on launch (Killed: 9)? The prebuilt aarch64-apple-darwin binary is not Apple-notarized, and Gatekeeper may kill a downloaded binary with no error message. The install.sh installer strips the quarantine attributes. If you downloaded the binary manually, strip them yourself:

xattr -dr com.apple.quarantine /path/to/cora
xattr -dr com.apple.provenance /path/to/cora

A binary built on your own machine with cargo install cora-code is not quarantined.

2. Authenticate

cora auth login

Pick a provider, enter your API key. Done. Provider env vars (ZAI_API_KEY, OPENAI_API_KEY, etc.) are auto-detected.

No key? Still useful. cora review and cora scan run the deterministic checks (rules, secrets, security) with no LLM configured, and your AI coding agent can do the AI review itself: see Review with your agent.

3. Review

cora review              # staged changes
cora review --base main  # vs a branch
cora review --unpushed   # unpushed commits
cora commit              # review + generate commit msg + commit
cora commit --yolo       # auto-commit, no prompts

4. Use it from your AI agent

cora index     # index the project (seconds)
cora install   # hooks + MCP + skill for Claude Code, Hermes, pi, omp and opencode

Your agent now gets matching code in front of the model on every prompt. How it works and what is written where: AI Agent Integration.

5. Project config

cora init  # creates .cora.yaml + installs the pre-commit hook

What you get

Review

  • 🤖 Any model — OpenAI, Anthropic, Groq, Ollama, Z.AI or any OpenAI-compatible API (bring your own key), or no key at all: your coding agent does the judging
  • 🛡️ Deterministic scanners — built-in rules, security patterns and secret detection that run without an LLM
  • 🚧 Quality gate and profiles — pass/fail thresholds for CI, strict/balanced/lax presets, your own regex rules in .cora.yaml
  • ✂️ Large pull requests — split into reviewable chunks automatically; a repeat review of the same diff is cached
  • 🧠 Language-aware — tailored guidance for Dart/Flutter, Svelte, TypeScript, Go, Rust, Python
  • 📋 SARIF output — upload to GitHub Code Scanning

Code intelligence

  • 🔍 Index symbols across 18 languages with a call graph; trace, impact analysis, dead code, affected tests
  • 🧠 Brain Mode — hybrid semantic search (FTS5 + a local code embedding model + graph) with RRF fusion; the 33.5 MB model is inside the release binaries (a cargo install build downloads it once on first use), no API key, no GPU
  • 🌳 Tree-sitter — AST-based symbol extraction for 13 languages: Rust, Go, Python, TypeScript/TSX, Java, C, C++, C#, Ruby, PHP, Scala, JavaScript, Svelte (via TypeScript delegation, zero extra dependency)
  • 🗄️ Multi-project database — one global symbol index, search across all your repos at once (vectors are one file per project)

Agents and CI

  • 🤖 Agent hooks — cora install makes Claude Code, Hermes, pi, omp and opencode put matching code in front of the model on every prompt (hook + MCP + skill), with --dry-run and --remove
  • 🔌 MCP server — 22 tools for AI coding agents (review, search, brain, debt, trace, dead code, graph query, agent-as-reviewer, ...)
  • 🪝 Pre-commit hooks — catch issues before they reach CI
  • 🔧 Configurable — per-project .cora.yaml, global ~/.codecora/cora-code/config.yaml, or env vars

Built to run anywhere — a single native Rust binary with no runtime dependencies for Linux, macOS and Windows.

Configuration

Priority: CLI flags → env vars → .cora.yaml (project) → ~/.codecora/cora-code/config.yaml (global) → defaults

# .cora.yaml
provider: zai
model: glm-5.1
focus: [security, bugs]

quality_gate:        # enforce code quality in CI
  enabled: true
  thresholds:
    max_critical: 0  # any critical finding fails the gate

cora config show prints the merged result. API keys live in ~/.codecora/cora-code/auth.toml (chmod 600), never in .cora.yaml. Everything else (quality profiles, custom rules, ignore files, brain and agent settings, environment variables): Configuration →

CI/CD

GitHub Marketplace

# .github/workflows/cora-review.yml
on: pull_request
jobs:
  review:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with: { fetch-depth: 0 }
      - uses: codecoradev/cora-review-action@v1
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          cora-api-key: ${{ secrets.CORA_API_KEY }}

Required secrets: CORA_API_KEY, CORA_BASE_URL (optional), CORA_MODEL (optional)

See GitHub Marketplace for full documentation.

Works on all CI platforms — Gitea, GitLab, Bitbucket →

Commands

Command Description
cora review Review code changes (staged, branch, commit, file)
cora scan Scan files for issues
cora commit Review + generate commit message + commit
cora index Index project symbols, vectors and call graph
cora brain Hybrid semantic search (FTS5 + vectors + graph)
cora callers / impact / trace Who calls a symbol, what a change breaks, call chains
cora install Configure AI coding agents (hooks, MCP, skill)
cora mcp Start the MCP server (22 tools) for AI coding agents
cora upgrade Self-upgrade from GitHub Releases (checksum-verified)

Also: explore, arch, affected, dead-code, query, routes, debt, findings, init, auth, config, providers, profile, serve, watch, hook, completion, upload-sarif. See CLI Reference → for every command and flag.

Performance

Bar chart: cold index about 0.6 seconds, incremental index about 0.13 seconds, one cora brain run about 0.2 seconds.

Measured on the cora-code repository (1,996 symbols, 179 files, release build, with the real potion-code-16M-v2 model).

Operation Time Notes
Cold index (full rebuild) ~0.6 s Walk + parse + embed every symbol + write the project's vector file
Incremental (no changes) ~0.13 s mtime:size fingerprint — skips unchanged files
cora brain (one CLI run) ~0.2 s Loads the 32 MB model, then FTS5 + vector scan + graph BFS → RRF fusion. A long-running cora mcp keeps the model loaded
Binary size ~36 MB (~69 MB release binary with the model, ~38.5 MB as tar.gz) Single binary; release binaries carry the 33.5 MB embedding model, a cargo install build downloads it once on first use

Measurements are indicative, not contractual. Your numbers will vary with codebase size, CPU cores, and disk I/O.

Environment Variables

CORA_API_KEY, CORA_PROVIDER, CORA_MODEL and CORA_BASE_URL override the config (handy in CI). Provider keys such as OPENAI_API_KEY, ANTHROPIC_API_KEY, GROQ_API_KEY and ZAI_API_KEY are detected automatically. CORA_EMBED_OFFLINE=1 never downloads the code model (release binaries already contain it); CODECORA_HOME moves the data directory. Full list: Configuration.

Documentation

Page Description
Getting Started Install, auth, first review
Installation Installer, archives, upgrade, verification
Usage Reviewing, scanning, review with your agent
Code Intelligence Index, brain search, trace, impact
AI Agent Integration Hooks, MCP and skills for Claude Code, Hermes, pi, omp, opencode
Configuration Config files, env vars, priority
CLI Reference All commands and flags
Providers Supported LLM providers
Examples Common workflows & CI setup
Changelog Release history
Roadmap Planned features

Star History

Star History Chart

Contributing

See CONTRIBUTING.md for guidelines. PRs welcome!

License

Apache-2.0

About

CLI-first AI code review — BYOK, diff/scan/branch, pre-commit hooks. 100% open source (MIT).

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

31 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages