Self-hosted AI code review for GitHub pull requests.
Cloudflare-native, queue-backed, repository-aware, and built for teams that want to own their review engine.
Website | Docs | Installation | Issues | Contributing
Codra listens to GitHub pull request events, runs AI-powered review jobs, posts inline findings back to the PR, and gives you a dashboard to inspect jobs, repositories, model routing, review history, and failed queue runs.
- Own the whole review loop: Run the GitHub App, Cloudflare Worker, queue, database, model credentials, and dashboard under your own control.
- Review with repository context: Codra checks pull request diffs for correctness, security, performance, maintainability, and repo-specific patterns.
- Configure each repository: Tune triggers, skipped paths, draft handling, mention reviews, labels, custom rules, and review budgets from the dashboard.
- Route models deliberately: Use global defaults, per-repo model chains, fallbacks, and size-based overrides for larger pull requests.
- Operate the system: Inspect job history, PR findings, webhook deliveries, queue failures, DLQ replay, model usage, and dashboard stats.
- Automatic reviews on
opened,synchronize,ready_for_review, andreopenedpull request events - Mention-triggered reviews for on-demand analysis
- Inline GitHub review comments plus summary reviews and check run updates
- Queue-backed processing through Cloudflare Queues
- Dead letter queue inspection, replay, and purge workflows
- GitHub OAuth dashboard authentication
- External PostgreSQL storage through Cloudflare Hyperdrive
- Google Gemini and Cloudflare Workers AI model providers
- Repository settings for labels, skipped globs, custom rules, and model routing
- GitHub sends Codra a pull request webhook.
- Codra verifies the signature and loads repository review settings.
- A review job is stored in PostgreSQL and queued on Cloudflare Queues.
- The Worker consumes the job, fetches the PR diff, runs model review passes, and formats findings.
- Codra posts inline comments and a summary review back to GitHub.
- The dashboard keeps the job history, findings, logs, stats, and replay tools available for operators.
- Worker: Cloudflare Workers, Hono, Wrangler
- Dashboard: React, Vite, Tailwind CSS, Radix UI, Recharts
- Data: PostgreSQL, Cloudflare Hyperdrive, Cloudflare KV
- Queues: Cloudflare Queues with DLQ workflows
- Models: Google Gemini and Cloudflare Workers AI
- GitHub: GitHub App webhooks, checks, reviews, and OAuth
- Quality: TypeScript, Zod, Vitest, Playwright browser tests
The full setup and operations guides live at codra.run/docs.
Contributions are welcome. Please read CONTRIBUTING.md before opening a pull request against dev. Codra uses a Contributor License Agreement for contributions.
Codra is licensed under the GNU Affero General Public License v3.0.
