Quick Start
Get Merlin AI Code Review running on your pull requests in under 5 minutes — no infrastructure required.
Zero-infrastructure start
The default config uses local file storage for RAG and requires only an Anthropic API key. You can add Qdrant, Pinecone, or other backends later.
Prerequisites
- A GitHub, GitLab, Bitbucket, Azure DevOps, or Gitea repository
- An API key for at least one AI provider (Anthropic, OpenAI, Gemini, etc.)
- Optional for RAG: Ollama installed locally, or an OpenAI API key for cloud embeddings
Step 1 — Add your API key as a repository secret
Go to your repository → Settings → Secrets and variables → Actions → New repository secret and add:
| Secret name | Value | Required |
|---|---|---|
ANTHROPIC_API_KEY | Your Claude API key (sk-ant-...) | Yes (or another provider key) |
GITHUB_TOKEN | Provided automatically by Actions | Yes |
Step 2 — Create the workflow file
Create the file below in your repository. Merlin AI Code Review will run automatically on every pull request using the official Docker image — no binary download needed.
name: Merlin AI Code Reviewon:pull_request:types: [opened, synchronize, reopened]permissions:contents: readpull-requests: writejobs:merlin-review:name: Merlin AI Reviewruns-on: ubuntu-latestcontainer:image: ghcr.io/arunachalamkalimuthu/merlin-ai-code-review:lateststeps:- uses: actions/checkout@v4with:fetch-depth: 0- name: Run Merlin Reviewenv:ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}PR_NUMBER: ${{ github.event.pull_request.number }}REPO: ${{ github.repository }}run: merlin review
Alternative: one-line installer
Prefer installing the binary directly? Replace the container block and run step with:
curl -fsSL \https://github.com/Arunachalamkalimuthu/merlin-ai-code-review/releases/latest/download/install.sh \| shmerlin review
Step 3 — Open a pull request
Push a branch and open a PR. Merlin AI Code Review will trigger automatically and post inline comments within seconds as github-actions[bot]. You can also trigger commands by commenting on the PR:
@merlin /review@merlin /describe@merlin /security@merlin /ask Is this change thread-safe?
Step 4 — (Optional) Add merlin.toml
Drop merlin.toml in your repo root to customise the AI provider, focus areas, and more. Without it, Merlin AI Code Review uses sensible defaults.
[ai]provider = "anthropic"model = "claude-sonnet-4-6"max_tokens = 4096temperature = 0.2[review]focus = ["bugs", "security", "style", "performance"]max_comments = 30chunk_lines = 200reflect = false
GitLab CI / Bitbucket / Azure DevOps / Gitea
See the Platforms page for complete examples for every supported CI system.
Next steps
- Configuration reference — all merlin.toml options
- Slash commands — 20+ commands to automate review, docs, and security
- RAG pipeline — index your codebase for context-aware reviews
- Autonomous agent — set up Slack/Discord integration