AI code reviewthat stays yours.
Merlin reviews every pull request with configurable AI — inline comments, security scans, docs generation, and an autonomous agent — without sending code to a third-party SaaS. Written in Rust 🦀 for maximum performance.
refactor: migrate auth to JWT tokens
+89 −42 · 3 files changed
Performance: JWT secret read on every request
env::var() is called per-request. Cache via once_cell::sync::Lazy to avoid repeated env lookups under load.
19
Slash commands
6
AI providers
5+
Git platforms
Rust 🦀
Blazing fast
From push to reviewed in seconds
No dashboard. No signup. No data leaving your infra.
Add to CI
Drop a single GitHub Actions step (or GitLab CI job). No server to run, no signup required.
Open a PR
Merlin triggers automatically. It reviews the diff in parallel chunks and posts inline comments sorted by severity.
Ship confidently
Bugs caught, docs generated, tests suggested. Every PR reviewed as if your best engineer was watching.
Everything you need, nothing you don't
One binary. Drop it in any CI pipeline. Your code never leaves your infrastructure.
Inline PR comments
AI posts file- and line-level comments directly on the PR — bugs, security, style, and performance — sorted by severity.
6 AI backends
Claude, GPT-4o, Gemini, Bedrock, Ollama, Claude Code CLI. Swap providers with one config line. No vendor lock-in.
Security scanning
OWASP top-10 analysis, secret detection, and Snyk dependency scanning via the /security and /snyk commands.
Concurrent reviews
Tokio fan-out — diff chunks reviewed in parallel. Large PRs finish in seconds, not minutes.
Webhook bot mode
Run merlin webhook and let GitHub/GitLab trigger commands when someone comments @merlin /review on any PR.
Reflect & Review
Optional second AI pass removes false positives, merges duplicates, and corrects severity before comments are posted.
See Merlin in action
Every feature, running live. Click any tab or watch it cycle automatically.
Inline PR comments, ranked by severity
AI reviews every diff chunk in parallel — bugs, security, style, and performance — posting inline comments sorted by severity with actionable fix suggestions.
Open source at heart.
Enterprise-ready by design.
Solo devs, startups, regulated banks, air-gapped defence labs — Merlin runs identically everywhere. One binary, zero telemetry, infinite control.
Open Source
For developers, startups & OSS teams
Written in Rust
12 MB static binary — no runtime, no Docker required.
MIT License
Fork it, modify it, ship it. No contributor agreements.
Self-hosted
Your source code never leaves your own servers. Ever.
BYOK
Your API key, your bill. No Merlin account needed.
Estimated monthly cost for 10 engineers
~$2 – $5
AI token usage only — no per-seat fee, ever
Enterprise & Corporate
For teams with compliance & security needs
GitLab Self-Hosted
First-class support for on-prem GitLab EE & CE instances.
Audit trails
Every AI call logged locally — HIPAA / SOC2 friendly.
Custom review rules
Org-wide coding standards enforced on every PR, every team.
Full air-gap mode
Ollama + local Qdrant = 100% offline, zero external calls.
Compliance-friendly by default
Slash commands, out of the box
Trigger from a PR comment, a CI step, or the autonomous agent.
/reviewFull inline code review/describeAuto-generate PR title & description/askQ&A about the diff/improveInline code suggestion blocks/generate_labelsAuto-label the PR/update_changelogPrepend CHANGELOG entry/add_docGenerate missing docstrings/similar_issueFind related open issues/testGenerate unit tests/explainPlain-language walkthrough/securityOWASP + secret detection scan/approveAI-assisted review verdict/commit_messageGenerate commit messages/docsDocs (readme/api/adr/wiki)/snykSnyk dependency scan/coverageTest coverage analysis/link_jiraLink related Jira issues/link_linearLink related Linear issues/triageCodeTriage issue searchContext-aware reviews
from your own codebase
Merlin indexes your codebase and past review comments into a vector store. Before every AI call, relevant snippets are retrieved and injected into the prompt — so the AI knows your conventions, past issues, and architectural patterns.
Embeddings run locally via Ollama — no embedding API cost. Five vector store backends to match any infrastructure.
localNo infraZero setup, flat file
memoryNo infraEphemeral, great for tests
qdrantDockerSelf-hosted production DB
chromaDockerOpen-source alternative
pineconeCloudManaged cloud vector store
# Enable context-aware reviews [rag] enabled = true store = "qdrant" # or "local" embed_model = "nomic-embed-text" top_k = 5 min_score = 0.70
# One-time setup $ ollama pull nomic-embed-text $ docker run -p 6333:6333 qdrant/qdrant $ merlin rag index . # Reviews now have full codebase context $ merlin review
$ merlin agent 🪄 Merlin Agent v0.1 — ready > review the PR, run security scan, and approve if clean Thought: Start with review, then security... → Tool: review ✓ 2 warnings → Tool: security ✓ 0 critical → Tool: rag_search ✓ conventions matched → Tool: approve ✓ PR #247 approved Done. No critical issues found. PR approved.
Reason. Act. Observe.
Repeat.
Merlin's ReAct-loop agent plans multi-step tasks autonomously. Give it a goal and it selects tools, observes results, and iterates until done.
All 19 slash commands available as tools, plus rag_search, post_comment, and get_pr_info.
CLI REPL
Interactive terminal session
Slack
Mention @merlin in any channel
Discord
Mention @Merlin to trigger tasks
Single-shot CI
merlin agent --task "..." (non-interactive)
Model-agnostic
Bring your own model.
Switch AI backends with one config line. No lock-in, ever.
Anthropic Claude
claude-sonnet-4-6
provider = "anthropic"OpenAI GPT-4o
gpt-4o-mini
provider = "openai"Claude Code CLI
No API key needed
provider = "claude-code"Google Gemini
gemini-2.0-flash
provider = "gemini"AWS Bedrock
claude-3-5-sonnet
provider = "bedrock"Ollama (local)
100% private, free
provider = "ollama"Why Merlin?
The only AI reviewer
you fully own.
Every other tool phones home to a SaaS cloud. Merlin runs entirely inside your infrastructure — no seat fees, no data sharing, no vendor lock-in.
| Feature | Merlin You are here | Qodo Merge qodo.ai | CodeRabbit coderabbit.ai | GitHub Copilot code review add-on | Sourcery sourcery.ai |
|---|---|---|---|---|---|
| Self-hosted / air-gapⓘRun 100% inside your own infra, no outbound SaaS calls | ✓ | ~ | ✗ | ✗ | ~ |
| Bring Your Own KeyⓘUse your own API key — vendor never sees your code | ✓ | ~ | ✗ | ✗ | ✗ |
| Open source (MIT)ⓘFull source available, fork & self-host freely | ✓ | ~ | ✗ | ✗ | ✗ |
| GitLab Self-HostedⓘWorks with on-prem GitLab EE/CE instances | ✓ | ~ | ~ | ✗ | ✗ |
| Written in RustⓘSingle binary, <30 MB, minimal CPU/RAM footprint | ✓ | ✗ | ✗ | ✗ | ✗ |
| 6+ AI providersⓘClaude, GPT-4o, Gemini, Bedrock, Ollama, Claude Code CLI | ✓ | ✓ | ~ | ✗ | ✗ |
| 19 slash commandsⓘ/review, /security, /test, /improve, /agent and 14 more | ✓ | ✓ | ~ | ✗ | ~ |
| RAG codebase contextⓘSemantic search over your entire repo at review time | ✓ | ~ | ✓ | ~ | ✗ |
| Autonomous agent modeⓘReAct loop — multi-step tasks across files & PRs | ✓ | ~ | ~ | ✗ | ✗ |
| Free foreverⓘNo seat licenses, no monthly subscription | ✓ | ~ | ~ | ✗ | ~ |
Zero data egress
Your source code never leaves your servers. Perfect for regulated industries — finance, healthcare, defence.
Rust performance
Single static binary. Boots in milliseconds, reviews a 1 000-line diff in under 10 seconds. Runs on a $5 VPS.
BYOK economics
Pay your AI provider at cost. No per-seat tax. A 10-engineer team spends ~$2–5/month on tokens.
Social proof
Trusted by engineers
who ship.
What teams are saying about Merlin.
Merlin caught a JWT secret being read on every request in our auth service. Would've killed us in prod. The OWASP scanning is genuinely sharp.
Sarah Chen
Staff Engineer · Series B fintech
We run 400+ PRs a month. Merlin reviews every single one in parallel — finishes before a human would even open the tab. Incredible for velocity.
Marcus Völler
Engineering Lead · DevTools startup
The RAG pipeline is the killer feature. It knows our coding conventions because we trained it on our own codebase. No SaaS can do that.
Priya Nair
Principal Engineer · Enterprise OSS team
Up and running in 60 seconds
Works on GitHub, GitLab (cloud + self-hosted), Bitbucket, Azure DevOps, and Gitea.
1GitHub Actions
on:pull_request:types: [opened, synchronize]jobs:merlin-review:runs-on: ubuntu-latestpermissions:pull-requests: writesteps:- uses: actions/checkout@v4with: { fetch-depth: 0 }- run: |curl -L .../merlin-linux-amd64 -o merlinchmod +x merlin && ./merlin reviewenv:GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
2GitLab CI (cloud + self-hosted)
merlin-review:image: ubuntu:22.04script:- curl -L .../merlin-linux-amd64 -o merlin- chmod +x merlin && ./merlin reviewvariables:GITLAB_TOKEN: $GITLAB_TOKENANTHROPIC_API_KEY: $ANTHROPIC_API_KEYrules:- if: $CI_PIPELINE_SOURCE == "merge_request_event"
GitLab Self-Hosted
Works with on-premise GitLab instances. Set GITLAB_URL=https://gitlab.company.com and configure your runner as normal.
Ready to ship
better code?
Merlin is free, open-source, and takes under 5 minutes to add to any CI pipeline — GitHub, GitLab (cloud & self-hosted), Bitbucket, Azure DevOps, and Gitea. Your code never leaves your infrastructure.