Quick Start
Getting Started

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 nameValueRequired
ANTHROPIC_API_KEYYour Claude API key (sk-ant-...)Yes (or another provider key)
GITHUB_TOKENProvided automatically by ActionsYes

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.

.github/workflows/merlin-review.yml
yaml
name: Merlin AI Code Review
on:
pull_request:
types: [opened, synchronize, reopened]
permissions:
contents: read
pull-requests: write
jobs:
merlin-review:
name: Merlin AI Review
runs-on: ubuntu-latest
container:
image: ghcr.io/arunachalamkalimuthu/merlin-ai-code-review:latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run Merlin Review
env:
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:

shell
curl -fsSL \
https://github.com/Arunachalamkalimuthu/merlin-ai-code-review/releases/latest/download/install.sh \
| sh
merlin 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:

text
@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.

merlin.toml
toml
[ai]
provider = "anthropic"
model = "claude-sonnet-4-6"
max_tokens = 4096
temperature = 0.2
[review]
focus = ["bugs", "security", "style", "performance"]
max_comments = 30
chunk_lines = 200
reflect = false

GitLab CI / Bitbucket / Azure DevOps / Gitea

See the Platforms page for complete examples for every supported CI system.

Next steps