需要先准备 .env 中的 GitHub App 凭据、webhook secret 和 OPENROUTER_API_KEY 等密钥;用 Codex CLI 提供方时需先 codex login 并只读挂载 CODEX_HOME;Bitbucket 评论命令的权限检查需要管理员权限,否则要在 commands.allowed_users 中列账户 id。

mira
miracodeaiApache-2.0活跃维护自托管的 AI 代码审查工具,能对 PR 做索引化审查、生成变更讲解、扫描漏洞、绘制依赖图,还支持自定义规则和从反馈中持续学习。
Self-hosted AI code reviewer with indexed PR reviews, walkthroughs, vulnerability scanning, dependency graphs, custom rules, and a learning loop.
docker run -p 8000:8000 --env-file .env -v "$(pwd)/mira.yaml:/app/mira.yaml" ghcr.io/miracodeai/mira:latest --config /app/mira.yamlREADME 未说明显存或 CPU 要求;支持通过 OpenRouter、vLLM、Ollama、Together、Groq、Fireworks 或 AWS Bedrock 等 OpenAI 兼容端点调用模型,也可用 Codex CLI 本地运行。
自托管 AI 代码审查工具,用你自己的 LLM key 审 PR,代码和数据都留在自己基础设施上
自托管的 AI 代码审查工具,能对 PR 做索引化审查、生成变更讲解、扫描漏洞、绘制依赖图,还支持自定义规则和从反馈中持续学习。
核心能力
- 用全仓库索引给模型提供跨文件上下文,不只审 diff
- 按置信度阈值、去重、自我批判和每 PR 评论上限过滤噪音
- 从已合并 PR 和人工评审模式中合成团队规则,形成学习闭环
- 每小时轮询 OSV.dev 扫描依赖 CVE,并提供依赖与影响范围图
- 审查时检查其他开放 PR,标记合并冲突和重复工作风险
容易踩的坑
- v0.11.1最新正式版2026-11-09 · 2026-11-09 12:00 UTC
What's Changed
- (fix): Reporting of failed reviews by @JJMira in https://github.com/miracodeai/mira/pull/429
- Grant the release gate the pull-request read permission it now needs by @JJMira in https://github.com/miracodeai/mira/pull/430
- Release 0.11.1 by @JJMira in https://github.com/miracodeai/mira/pull/431
Full Changelog: https://github.com/miracodeai/mira/compare/v0.11.0...v0.11.1
- v0.11.02026-11-07 · 2026-11-07 15:17 UTC
查看更新说明
What's Changed
- feat(review): show review progress and result on the PR via check runs by @djdembeck in https://github.com/miracodeai/mira/pull/369
- fix(forgejo): infer web base URL from configured API URL by @robets in https://github.com/miracodeai/mira/pull/394
- fix(review): honor disabled walkthrough diagrams by @vikasagarwal101 in https://github.com/miracodeai/mira/pull/386
- fix(security): preserve active vulnerability history during pruning by @vikasagarwal101 in https://github.com/miracodeai/mira/pull/387
- fix(forgejo): preserve unrelated labels when resuming reviews by @vikasagarwal101 in https://github.com/miracodeai/mira/pull/388
- fix(index): prevent SQLite org readers from recreating removed stores by @vikasagarwal101 in https://github.com/miracodeai/mira/pull/389
- fix(dashboard): apply package search limits to unique results by @vikasagarwal101 in https://github.com/miracodeai/mira/pull/390
- ci: bump docker/login-action from 4.6.0 to 4.7.0 by @dependabot[bot] in https://github.com/miracodeai/mira/pull/403
- fix(walkthrough): honest verdict when nothing is posted, opt-in unverified hints by @teuteuguy in https://github.com/miracodeai/mira/pull/402
- deps(ui): bump vite from 8.3.0 to 8.3.5 in /ui/mira by @dependabot[bot] in https://github.com/miracodeai/mira/pull/407
- deps(ui): bump lucide-react from 1.46.0 to 1.61.0 in /ui/mira by @dependabot[bot] in https://github.com/miracodeai/mira/pull/408
- deps(ui): bump @vitejs/plugin-react from 6.1.1 to 6.1.2 in /ui/mira by @dependabot[bot] in https://github.com/miracodeai/mira/pull/405
- deps(ui): bump typescript-eslint from 8.72.0 to 8.72.1 in /ui/mira by @dependabot[bot] in https://github.com/miracodeai/mira/pull/406
- deps(ui): bump radix-ui from 1.6.7 to 1.8.1 in /ui/mira by @dependabot[bot] in https://github.com/miracodeai/mira/pull/404
- feat: add Bitbucket Cloud as a fourth Git provider by @teuteuguy in https://github.com/miracodeai/mira/pull/391
- fix(llm): retry empty plain completions by @vikasagarwal101 in https://github.com/miracodeai/mira/pull/392
- fix(webhooks): include PR number in review.failed payload by @zerone0x in https://github.com/miracodeai/mira/pull/414
- fix(security): preserve alerts when OSV results are unavailable by @vikasagarwal101 in https://github.com/miracodeai/mira/pull/397
- fix(types): distinguish walkthrough display values by @vikasagarwal101 in https://github.com/miracodeai/mira/pull/399
- test(engine): configure agentic responses in local mocks by @vikasagarwal101 in https://github.com/miracodeai/mira/pull/398
- fix(types): separate indexer task collections by @vikasagarwal101 in https://github.com/miracodeai/mira/pull/400
- fix(walkthrough): use a real emoji in the skipped-files heading by @teuteuguy in https://github.com/miracodeai/mira/pull/409
- fix(walkthrough): finalize the placeholder when the walkthrough can't be posted by @teuteuguy in https://github.com/miracodeai/mira/pull/410
- deps(ui): bump @vitejs/plugin-react from 6.1.2 to 6.2.1 in /ui/mira by @dependabot[bot] in https://github.com/miracodeai/mira/pull/421
- deps(ui): bump react-dom from 19.3.0 to 19.3.1 in /ui/mira by @dependabot[bot] in https://github.com/miracodeai/mira/pull/420
- deps(ui): bump @types/node from 26.6.2 to 26.6.6 in /ui/mira by @dependabot[bot] in https://github.com/miracodeai/mira/pull/418
- deps(ui): bump tailwindcss from 4.3.3 to 4.3.4 in /ui/mira by @dependabot[bot] in https://github.com/miracodeai/mira/pull/417
- deps(ui): bump globals from 17.13.0 to 17.14.0 in /ui/mira by @dependabot[bot] in https://github.com/miracodeai/mira/pull/419
- fix(review): surface agentic chunk failures instead of reporting clean by @gavrh in https://github.com/miracodeai/mira/pull/401
- (feat) Increase reviewer performance by @JJMira in https://github.com/miracodeai/mira/pull/423
- feat(llm): cache the stable review prompt prefix on Anthropic models by @thyaravind in https://github.com/miracodeai/mira/pull/413
- Release 0.1
- v0.10.12026-10-28 · 2026-10-28 21:02 UTC
查看更新说明
What's Changed
- fix(index): reject incomplete repository tree listings by @vikasagarwal101 in https://github.com/miracodeai/mira/pull/365
- fix(security): preserve ecosystem identity in PR dependency scans by @vikasagarwal101 in https://github.com/miracodeai/mira/pull/366
- fix(security): anchor vulnerability comments to their source manifest by @vikasagarwal101 in https://github.com/miracodeai/mira/pull/367
- fix(llm): align provider reasoning and output request shapes by @gavrh in https://github.com/miracodeai/mira/pull/368
- fix(engine): PR comment walkthroughs by @JJMira in https://github.com/miracodeai/mira/pull/382
- fix(dashboard): count persisted SQLite vulnerabilities in org summary by @vikasagarwal101 in https://github.com/miracodeai/mira/pull/377
- fix(index): preserve refs and paths in per-file content requests by @vikasagarwal101 in https://github.com/miracodeai/mira/pull/374
- fix(index): forward tarball path filters on GitLab and Forgejo by @vikasagarwal101 in https://github.com/miracodeai/mira/pull/376
- fix(security): deduplicate exact PR vulnerability query tuples by @vikasagarwal101 in https://github.com/miracodeai/mira/pull/375
- fix(dashboard): search review history before applying the match cap by @vikasagarwal101 in https://github.com/miracodeai/mira/pull/379
- fix(dashboard): stream complete review history for charts by @vikasagarwal101 in https://github.com/miracodeai/mira/pull/378
- fix(index): preserve refs in repository tree requests by @vikasagarwal101 in https://github.com/miracodeai/mira/pull/383
- fix(index): preserve refs in repository archive requests by @vikasagarwal101 in https://github.com/miracodeai/mira/pull/384
- Release 0.10.1 by @JJMira in https://github.com/miracodeai/mira/pull/385
Full Changelog: https://github.com/miracodeai/mira/compare/v0.10.0...v0.10.1
- v0.10.02026-10-26 · 2026-10-26 16:52 UTC
查看更新说明
What's Changed
- deps(ui): bump vite from 8.2.2 to 8.3.0 in /ui/mira by @dependabot[bot] in https://github.com/miracodeai/mira/pull/304
- deps(ui): bump eslint from 10.9.1 to 10.10.0 in /ui/mira by @dependabot[bot] in https://github.com/miracodeai/mira/pull/305
- deps(ui): bump eslint-plugin-react-refresh from 0.5.5 to 0.5.7 in /ui/mira by @dependabot[bot] in https://github.com/miracodeai/mira/pull/306
- deps(ui): bump lucide-react from 1.38.0 to 1.46.0 in /ui/mira by @dependabot[bot] in https://github.com/miracodeai/mira/pull/308
- deps(ui): bump @xyflow/react from 12.11.5 to 12.11.6 in /ui/mira by @dependabot[bot] in https://github.com/miracodeai/mira/pull/309
- deps(ui): bump react and @types/react in /ui/mira by @dependabot[bot] in https://github.com/miracodeai/mira/pull/310
- fix(codex): import review schemas from tool_schemas by @jaredwad in https://github.com/miracodeai/mira/pull/311
- fix(github): use configured enterprise URL for GitHub API client by @MahlonW in https://github.com/miracodeai/mira/pull/313
- feat(config): make indexing LLM concurrency configurable (index.llm_concurrency) by @SylTi in https://github.com/miracodeai/mira/pull/315
- fix(llm): keep JSON mode hint in user input by @djdembeck in https://github.com/miracodeai/mira/pull/320
- fix(github): log webhook filter decisions at INFO level by @SylTi in https://github.com/miracodeai/mira/pull/316
- deps(ui): bump typescript-eslint from 8.69.0 to 8.70.0 in /ui/mira by @dependabot[bot] in https://github.com/miracodeai/mira/pull/307
- fix(dashboard): support nested GitLab namespaces by @geexup in https://github.com/miracodeai/mira/pull/296
- deps(ui): bump @types/node from 26.4.0 to 26.6.2 in /ui/mira by @dependabot[bot] in https://github.com/miracodeai/mira/pull/323
- fix(dashboard): keep ISO weeks together across New Year by @vikasagarwal101 in https://github.com/miracodeai/mira/pull/353
- fix(webhooks): report only HTTP 2xx as successful delivery by @vikasagarwal101 in https://github.com/miracodeai/mira/pull/352
- feat(index): expand recognized source and config file types by @gavrh in https://github.com/miracodeai/mira/pull/351
- fix(dashboard): mark repos failed when initial indexing setup fails by @NoRain211 in https://github.com/miracodeai/mira/pull/350
- feat(commands): add command authorization by @gavrh in https://github.com/miracodeai/mira/pull/349
- fix(github): build the client in the PR description helpers by @omertahaoztop in https://github.com/miracodeai/mira/pull/348
- fix(llm): disable DeepSeek thinking when reasoning is off by @gavrh in https://github.com/miracodeai/mira/pull/346
- Fetch conventions and manifests the tarball cache omits by @coffeehorn in https://github.com/miracodeai/mira/pull/344
- fix(handlers): enforce reject policy on free-form thread disagreements by @gavrh in https://github.com/miracodeai/mira/pull/362
- deps(ui): bump shadcn from 4.19.1 to 4.22.1 in /ui/mira by @dependabot[bot] in https://github.com/miracodeai/mira/pull/361
- deps(ui): bump prettier from 3.9.6 to 3.9.10 in /ui/mira by @dependabot[bot] in https://github.com/miracodeai/mira/pull/359
- deps(ui): bump typescript-eslint from 8.70.0 to 8.72.0 in /ui/mira by @dependabot[bot] in https://github.com/miracodeai/mira/pull/358
- deps(ui): bump eslint from 10.10.0 to 10.13.0 in /ui/mira by @dependabot[bot] in https://github.com/miracodeai/mira/pull/356
- fix(security): retain distinct resolved npm versions in polling by @vikasagarwal101 in https://github.com/miracodeai/mira/pull/355
- fix(webhooks): validate and contain malformed URLs by @vikasagarwal101 in https://github.com/miracodeai/mira/pull/354
- deps(ui): bump globals from 17.11.0 to 17.13.0 in /ui/mira by @dependabot[bot] in https://github.com/miracodeai/mira/pull/360
- fix(pg): add per-author review and feedback quality to PgIndexStore by @RizgarOzan in https://github.com/miracodeai/mira/pull/340
- fix(walkthrough): accept capitalized group and file keys by @NoRain211
- v0.9.12026-09-24 · 2026-09-24 14:08 UTC
查看更新说明
What's Changed
- feat: add Codex CLI LLM provider by @poonasor in https://github.com/miracodeai/mira/pull/142
- deps(ui): bump shadcn from 4.18.0 to 4.19.0 in /ui/mira by @dependabot[bot] in https://github.com/miracodeai/mira/pull/279
- deps(ui): bump eslint from 10.8.1 to 10.9.1 in /ui/mira by @dependabot[bot] in https://github.com/miracodeai/mira/pull/278
- deps(ui): bump lucide-react from 1.31.0 to 1.34.0 in /ui/mira by @dependabot[bot] in https://github.com/miracodeai/mira/pull/276
- feat(review): add xhigh thinking mode for reviews by @djdembeck in https://github.com/miracodeai/mira/pull/268
- fix(review): enforce hard character cap on review summaries by @stoicism02 in https://github.com/miracodeai/mira/pull/281
- deps(ui): bump vite from 8.2.1 to 8.2.2 in /ui/mira by @dependabot[bot] in https://github.com/miracodeai/mira/pull/275
- deps(ui): bump @vitejs/plugin-react from 6.0.5 to 6.1.1 in /ui/mira by @dependabot[bot] in https://github.com/miracodeai/mira/pull/274
- deps(ui): bump @types/node from 26.2.0 to 26.3.0 in /ui/mira by @dependabot[bot] in https://github.com/miracodeai/mira/pull/272
- deps(ui): bump typescript-eslint from 8.67.0 to 8.69.0 in /ui/mira by @dependabot[bot] in https://github.com/miracodeai/mira/pull/291
- deps(ui): bump @types/react-dom from 19.2.4 to 19.2.5 in /ui/mira by @dependabot[bot] in https://github.com/miracodeai/mira/pull/289
- deps(ui): bump eslint-plugin-react-refresh from 0.5.4 to 0.5.5 in /ui/mira by @dependabot[bot] in https://github.com/miracodeai/mira/pull/287
- deps(ui): bump @types/node from 26.3.0 to 26.4.0 in /ui/mira by @dependabot[bot] in https://github.com/miracodeai/mira/pull/286
- deps(ui): bump @xyflow/react from 12.11.3 to 12.11.5 in /ui/mira by @dependabot[bot] in https://github.com/miracodeai/mira/pull/284
- deps(ui): bump shadcn from 4.19.0 to 4.19.1 in /ui/mira by @dependabot[bot] in https://github.com/miracodeai/mira/pull/288
- deps(ui): bump lucide-react from 1.34.0 to 1.38.0 in /ui/mira by @dependabot[bot] in https://github.com/miracodeai/mira/pull/283
- fix(walkthrough): harden mermaid diagrams for GitHub rendering by @djdembeck in https://github.com/miracodeai/mira/pull/299
- fix(github): resolve fresh token per API call by @djdembeck in https://github.com/miracodeai/mira/pull/300
- feat(review): append generated summary to PR description by @djdembeck in https://github.com/miracodeai/mira/pull/301
- fix(forgejo): use web compare URL for .diff endpoint between 2 commits by @bvalean in https://github.com/miracodeai/mira/pull/302
- Release v0.9.1 by @JSMira in https://github.com/miracodeai/mira/pull/321
New Contributors
- @poonasor made their first contribution in https://github.com/miracodeai/mira/pull/142
- @stoicism02 made their first contribution in https://github.com/miracodeai/mira/pull/281
- @bvalean made their first contribution in https://github.com/miracodeai/mira/pull/302
Full Changelog: https://github.com/miracodeai/mira/compare/v0.9.0...v0.9.1
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
Self-host every feature: full review engine, codebase indexing, vulnerability scanning, custom rules, org-wide package search, dashboard, learning loop. No paid tier, no license key, no SaaS upsell.
Mira reviews your pull requests using your choice of LLM (via OpenRouter, which fronts Anthropic, OpenAI, Google, DeepSeek, and more) and posts concise, actionable feedback. The noise filter, confidence clamping, and learning loop ensure you only see comments that matter. See FEATURES.md for the full surface.
Why Teams Choose Mira
- Model agnostic — Run Claude, GPT, Gemini, DeepSeek, Llama, or any OpenAI-compatible endpoint: OpenRouter, vLLM, Ollama, Together, Groq, Fireworks, or AWS Bedrock direct. Per-provider quirks are config, not code, so adding a provider is a one-line entry.
- Zero markup on LLM costs — Bring your own key. You pay the model provider directly; Mira never proxies your spend or adds a multiplier. The dashboard shows real per-repo, per-model cost — not estimates.
- Learns from your context — Mira synthesizes rules from your merged PRs: rejected comments and human review patterns become team rules that shape future reviews.
- You set the rules — Define custom and org-wide review rules in plain language, per-repo via
.mira.yamlor from the dashboard. - Privacy first — Self-hosted by default. Diffs, indexes, review history, and CVE data live in your SQLite or Postgres, on infra you own. No phone-home, no required telemetry, no "is this used for training?"
- Low-noise reviews — Confidence thresholds, dedup, a self-critique pass, and per-PR caps mean every comment is one worth reading — Mira has the best precision of any top-tier tool on the public Code Review Bench, on a model that costs cents per review.
- Catches PRs stepping on each other — While reviewing, Mira checks the repo's other open PRs and flags merge-conflict risk and duplicate effort right in the walkthrough.
- Indexed, cross-file context — A full-repo code index gives the model real project context, not just the diff — plus org-wide package search and hourly OSV.dev CVE scanning across every repo.
- GitHub, GitLab, Forgejo, and Bitbucket Cloud — Auto-reviews every PR and merge request and answers
@miracodeaiquestions inline across GitHub, GitLab, Forgejo (incl. Codeberg), and Bitbucket Cloud. The engine, indexer, and dashboard are provider-agnostic, so a new host is a data entry plus one provider class. - Self-host on day one — Docker image with Railway / Fly.io / Render configs, SQLite or Postgres. Every feature included.
Dashboard

Your data, your dashboard
Most AI reviewers are SaaS: your diffs (and often the full surrounding code) leave for a third-party server, and the only "view" you get is the comments that come back on a PR. Mira flips both halves of that:
- Your code never leaves your infra. Diffs, embeddings, indexes, review history, vulnerability data, all stored in your SQLite or Postgres, on infrastructure you own. No phone-home, no required telemetry, no "is this used for training?" question.
- The dashboard you see above is yours. It's not a marketing screenshot of someone else's view of your code. CodeRabbit, Greptile, and similar SaaS reviewers don't expose anything like it. Mira's dashboard surfaces signals you don't get anywhere else:
- Org-wide package inventory: answer "which repos use
[email protected]?" in one query. Stack it next to your CVE feed for instant blast-radius checks. - CVE alerts on every dependency: hourly OSV.dev poll, severity + advisory link + fix version surfaced inline next to the package.
- Dependency + blast-radius graphs: see exactly which files and repos depend on a symbol before you change it.
- Per-repo review event stream: every webhook, every chunk, every cost figure, in one place for live troubleshooting.
- Cost & token telemetry: actual spend per repo and per model, not estimates, because you control the LLM key.
- Review-health page: stale/waiting PRs, a reviewer-responsiveness leaderboard, throughput trends, and rubber-stamp detection (approvals with no substantive review) — plus per-contributor analytics with a year-long heatmap and Mira's review-quality signal.
- Coming soon, change-frequency heatmaps: surface the files that bug fixes keep landing on so you can target review attention.
- Org-wide package inventory: answer "which repos use
If your engineering team needs answers like "which of our repos are exposed to this CVE?" or "what's the blast radius of changing this function?", those questions stop being multi-day investigations and start being one-click dashboard pages.
Benchmark
On the full 50-PR offline set of the public Martian Code Review Bench, Mira running an inexpensive model (DeepSeek v4.1 flash) ranks first on F1 of 23 published reviewers and posts the fewest unmatched comments of any tool above 50% recall. Run on 6 November 2026.
| Reviewer | Precision | Recall | F1 | TP / FP / FN |
|---|---|---|---|---|
| Mira · DeepSeek v4.1 flash | 75.0% | 55.1% | 63.5 | 87 / 29 / 71 |
| Cubic v2 | 56.5% | 60.8% | 58.5 | 96 / 74 / 62 |
| Qodo Extended v2 | 56.2% | 57.0% | 56.6 | 90 / 70 / 68 |
| Augment | 52.4% | 61.4% | 56.6 | 97 / 88 / 61 |
| Devin | 67.3% | 41.8% | 51.6 | 66 / 32 / 92 |
| Qodo v2 | 47.1% | 56.3% | 51.3 | 89 / 100 / 69 |
| Cursor Bugbot | 54.3% | 44.3% | 48.8 | 70 / 59 / 88 |
| GitLab Duo | 47.5% | 48.1% | 47.8 | 76 / 84 / 82 |
| Greptile v4.1 | 46.9% | 48.1% | 47.5 | 76 / 86 / 82 |
| GitHub Copilot v2 | 34.3% | 62.0% | 44.1 | 98 / 188 / 60 |
| CodeRabbit | 33.8% | 58.2% | 42.8 | 92 / 180 / 66 |
| Claude Code | 36.5% | 41.1% | 38.7 | 65 / 113 / 93 |
The full ranking of all 23 reviewers, per-PR results, head commits and settings are in benchmark-results.json.
Mira sits furthest up on the precision axis at a recall most tools don't reach: the tools that find a few more bugs (Cubic, Augment, Copilot, CodeRabbit) post two to six times as many comments that match nothing in the reference set.
Median review time was 106 seconds per PR; all 50 reviews completed.
Methodology: all 50 PRs of the Martian Code Review Bench offline dataset, reviewed once each with Mira's shipping defaults and scored with the benchmark's own matching prompts and Claude Sonnet 4.5 as the judge; competitor rows are the benchmark's published results on the same PRs. Settings, per-PR results and commit pins are in
benchmark-results.json.
Quick Start
Run Mira self-hosted to auto-review every PR and merge request and answer @miracodeai questions inline. GitHub (as a GitHub App), GitLab (via a group/project access token), Forgejo/Codeberg (via an access token), and Bitbucket Cloud (via an access or API token) are all supported.
1. Deploy — one-click on Railway, or with Docker:
# mira.yaml — deployment-wide defaults. Every key is optional.
llm:
model: "anthropic/claude-sonnet-4-6"
indexing_model: "anthropic/claude-haiku-4-5"
# .env — secrets only.
MIRA_GITHUB_APP_ID=123456
MIRA_GITHUB_PRIVATE_KEY="$(cat private-key.pem)"
MIRA_WEBHOOK_SECRET=your-secret
OPENROUTER_API_KEY=sk-or-...
docker run -p 8000:8000 --env-file .env \
-v "$(pwd)/mira.yaml:/app/mira.yaml" \
ghcr.io/miracodeai/mira:latest --config /app/mira.yaml
2. Install the app on your repos — every PR gets reviewed.
Bitbucket Cloud — instead of the GitHub App creds, set:
# A workspace/project/repository access token (Bearer), or an API token as email:token.
# Scopes: repository read, pull requests read+write, webhooks read+write.
MIRA_BITBUCKET_TOKEN=ATCTT3x...
MIRA_BITBUCKET_WEBHOOK_SECRET=your-secret
MIRA_BITBUCKET_WORKSPACE=your-workspace # optional: dashboard repo discovery scope
MIRA_BITBUCKET_BOT_USER=mira # optional: bot nickname if the token can't read /user
Then add a workspace (or repository) webhook pointing at https://<mira-host>/bitbucket/webhook with the same secret and the triggers Repository: Push, Pull request: Created, Updated, Merged, Comment created. Bitbucket PRs have no labels, so @mira pause state is kept in Mira's database. Comment commands check repository permission through the workspace permissions API, which needs admin rights; otherwise list reviewers' account ids in commands.allowed_users. Bitbucket nicknames are not unique, so authorization and the allowlist match the commenter's account id, never the nickname.
→ Full walkthrough: creating the GitHub App & quickstart · GitLab setup · deploy options · choosing models, custom endpoints & AWS Bedrock
Codex CLI
If you already use OpenAI Codex locally, Mira can run reviews through the
Codex CLI instead of an HTTP API key. Authentication stays inside Codex via
CODEX_HOME/auth.json, created by codex login:
# mira.yaml
llm:
provider: "codex-cli"
model: "codex-default" # use the Codex CLI default model
codex_home: "/run/codex" # optional; defaults to CODEX_HOME
codex_sandbox: "read-only" # the only accepted sandbox policy
codex_timeout_seconds: 900 # optional
The official Mira image includes a pinned Codex CLI. Mount a Codex login read-only:
docker run -p 8000:8000 --env-file .env \
-e CODEX_HOME=/run/codex \
-v "$HOME/.codex:/run/codex:ro" \
-v "$(pwd)/mira.yaml:/app/mira.yaml:ro" \
ghcr.io/miracodeai/mira:latest --config /app/mira.yaml
This provider does not require OPENROUTER_API_KEY. Mira copies only auth.json
from the read-only mount into a private, writable temporary Codex home for each
invocation. It launches Codex in an empty temporary workspace with a minimal
environment, disables inherited shell environment variables and user/project
rules, and enforces the read-only sandbox.
Provider choice, executable/auth paths, sandbox policy, and timeout are
deployment-only settings; repository .mira.yaml files cannot override them.
For one-shot mira review runs, --config is treated as untrusted by default.
An operator-owned config may opt in with --trust-execution-settings; never use
that flag with a repository-controlled file.
Codex CLI does not expose Mira's temperature or hard output-token controls, so Mira disables ensemble sampling for this provider. The mounted OAuth session is still a sensitive deployment credential: use a dedicated Codex account/session and isolate the Mira container from unrelated host files and services.
Configuration
mira.yaml (loaded via --config) holds deployment-wide defaults. Drop a .mira.yaml in any repo — or use the dashboard — to override per-repo; both deep-merge over mira.yaml for that repo only:
# .mira.yaml — optional per-repo override
filter:
confidence_threshold: 0.5 # noisier repo → lower bar
max_comments: 10
→ Full schema and every key: Configuration docs.
Development
git clone https://github.com/miracodeai/mira.git
cd mira
pip install -e ".[dev,serve]"
# Run tests
pytest tests/ -v
# Run the regression suite (hits real GitHub + LLM, ~$1, ~3 min).
# Pinned PRs whose findings have flickered across iterations. Run before
# merging changes that touch prompts, the noise filter, or the engine.
OPENROUTER_API_KEY=... GITHUB_TOKEN=... pytest -m eval -v
# Lint
ruff check src/ tests/
# Type check
mypy src/mira/ --ignore-missing-imports
License
Apache 2.0. See LICENSE.