Quickstart
Deploy Mira, connect GitHub or GitLab, and watch it review your first pull request.
This guide takes you from zero to a Mira review on a real PR in about ten minutes. You'll pick a deployment target, connect GitHub or GitLab, and then open a pull request.
1. Get an OpenRouter API key
Mira talks to OpenRouter under the hood, so a single key works across Anthropic, OpenAI, Google, DeepSeek, and more.
- Sign up at openrouter.ai.
- Generate a key. The free tier is enough to test Mira on a few PRs.
- Save it as
OPENROUTER_API_KEY.
2. Connect GitHub, GitLab, or Forgejo
Pick your platform — or several; one Mira deployment can review on each at the same time.
Mira runs as a GitHub App that auto-reviews every PR.
The detailed walkthrough is in Set up GitHub. The summary below is the minimum required to start a deployment.
At github.com/settings/apps/new:
- Webhook URL:
https://your-server.com/github/webhook(you'll fill this in once you've deployed in step 3; you can come back and edit it). - Webhook secret: generate any 32+ byte random string and save it as
MIRA_WEBHOOK_SECRET. - Permissions: Pull Requests (read & write), Contents (read & write), Issues (read & write), Metadata (read). Contents needs write (not just read) so Mira can auto-resolve review threads — GitHub requires it.
- Events: Pull request, Issue comment, Push, Installation.
- Private key: generate a
.pemand download it.
Note your App ID (numeric, top of the app settings page).
GitLab has no app-install model — Mira uses a group or project access token plus a webhook instead.
The detailed walkthrough is in Set up GitLab. The summary below is the minimum required to start a deployment.
- Access token: at Group → Settings → Access tokens (or per
project), create a token with role
Developeror higher and scopeapi. Save it asMIRA_GITLAB_TOKEN. - Webhook: at Settings → Webhooks → Add new webhook, set the URL
to
https://your-server.com/gitlab/webhook(you'll fill this in once you've deployed in step 3), set the secret token to a random 32+ byte string saved asMIRA_GITLAB_WEBHOOK_SECRET, and enable the Merge request events, Comments, and Push events triggers. - Self-managed instance? Also set
MIRA_GITLAB_API_URLto your API base, e.g.https://gitlab.acme.com/api/v4.
Forgejo (and Codeberg) use an access token plus a webhook, like GitLab.
The detailed walkthrough is in Set up Forgejo. The summary below is the minimum required to start a deployment.
- Access token: at Settings → Applications → Generate new token,
grant
repositoryread/write. Save it asMIRA_FORGEJO_TOKEN. - Webhook: on the repo or org, Settings → Webhooks → Add webhook →
Forgejo, set the target URL to
https://your-server.com/forgejo/webhook(you'll fill this in once you've deployed in step 3), set the secret to a random 32+ byte string saved asMIRA_FORGEJO_WEBHOOK_SECRET, and enable Pull request, Issue comment, and Push events. - Self-hosted instance? Also set
MIRA_FORGEJO_API_URLto your API base, e.g.https://git.acme.com/api/v1(defaults to Codeberg).
3. Deploy Mira
Pick the path that fits your stack. Each deploys the same ghcr.io/miracodeai/mira image.
docker run -p 8000:8000 \
-e MIRA_GITHUB_APP_ID=123456 \
-e MIRA_GITHUB_PRIVATE_KEY="$(cat private-key.pem)" \
-e MIRA_WEBHOOK_SECRET=your-secret \
-e MIRA_MODEL=anthropic/claude-sonnet-4-6 \
-e OPENROUTER_API_KEY=sk-or-... \
-e ADMIN_PASSWORD=change-me \
ghcr.io/miracodeai/mira:latestOn GitLab, swap the three GitHub lines for your GitLab credentials:
-e MIRA_GITLAB_TOKEN=glpat-... \
-e MIRA_GITLAB_WEBHOOK_SECRET=your-secret \Set both platforms' credentials to review on both. See Deploying with Docker for volume mounts, Postgres, and TLS.
Click the deploy button on the Mira README, paste your env vars, deploy. Full walkthrough: Deploying on Railway.
fly launch from a clone, set secrets with fly secrets set …, then
fly deploy. Full walkthrough: Deploying on Fly.io.
Connect the render.yaml
blueprint, set the env vars in the Render dashboard. Full walkthrough:
Deploying on Render.
Once the service is running, hit https://your-server.com/health and you
should get a 200.
4. Point the webhook at your deployment
- GitHub: back in your GitHub App's settings, set the webhook URL to
https://your-server.com/github/webhook. Save. - GitLab: back in Settings → Webhooks, edit the webhook so its URL is
https://your-server.com/gitlab/webhook. Save.
5. Connect a repository
- GitHub: from the app's public install page, choose a repo (or "All repositories") and install.
- GitLab: nothing to install — every project covered by the token and webhook registers itself with Mira the first time an MR event arrives.
6. Open a pull request
Open a PR (or a merge request on GitLab) and Mira will:
- Index the repository in the background (one time, takes a few minutes for a small repo).
- Post a placeholder review comment within ~1 second.
- Stream a walkthrough comment within ~10 seconds.
- Post inline comments within a minute.
If anything looks off, tail the server logs. Mira prints a structured event for every webhook it receives.
What's next
Tune review behaviour
Drop a .mira.yaml in your repo to set confidence thresholds, comment caps, and severity floors.
Open the dashboard
Browse / on your deployment to see indexed repos, packages, vulnerabilities, and stats.
Chat with the bot
Comment @miracodeai <question> on any PR to ask about the code.
Production hardening
Webhook secrets, TLS, Postgres, secret management — before you go live.

Mira