QUICKSTART

Install, deploy, and review PRs

Step-by-step guide from clone to your first automated review — Docker, manual install, or desktop app.


BEFORE YOU START

Prerequisites

You need a few things ready before GitClaw can review pull requests.

Runtime

Docker path: Docker and Docker Compose. Manual path: Node.js 20.9+ and npm. Desktop path: download an installer — no Docker required.

AI provider

An API key from OpenRouter, Anthropic, Groq, or a local OpenAI-compatible server such as Ollama.

Git host

A GitHub App for GitHub reviews. GitLab and/or Bitbucket OAuth apps only if you use those providers.

Public URL for webhooks

Git providers must reach your instance to deliver PR events. Use your production domain, or a tunnel (ngrok, cloudflared) while developing locally.


STEP 1

Install GitClaw

Pick one path. Docker is the fastest way to get running.

A

Docker — clone and start

The compose stack runs Postgres and the app. Migrations apply automatically on container start.

Terminal
git clone https://github.com/Abhivera/gitclaw.git
cd gitclaw
cp .env.example .env
docker compose up --build

Open http://localhost:3000 when the containers are healthy. Skip to Configure to fill in .env.

B

Manual — clone, Postgres, migrate, run

  1. Clone and install dependencies:
1. Clone
git clone https://github.com/Abhivera/gitclaw.git
cd gitclaw
npm install
  1. Start Postgres (listens on port 5438, database gitclaw):
2. Postgres
docker compose up -d postgres
  1. Copy the example env file — you will edit it in the next section:
3. Environment
cp .env.example .env
  1. Apply database migrations:
4. Migrate
npm run db:migrate
  1. Start the dev server (background workers start automatically):
5. Run
npm run dev

Open http://localhost:3000.

C

Desktop app — download and launch

Desktop builds

Prefer a packaged app? Download GitClaw for Windows, macOS, or Linux from gitclaw.online/downloads.

  1. Install and open GitClaw. The dashboard opens automatically.
  2. Go to File → Open configuration folder and edit .env with your GitHub App and AI keys.
  3. Restart the app after saving configuration.

The desktop app uses an embedded Postgres instance — no separate database setup. For webhooks, use a tunnel and set APP_URL plus ALLOWED_DEV_ORIGINS to your public hostname (see Deploy).


STEP 2

Configure environment

Edit .env in the project root (or the desktop configuration folder). Restart the app after changes.

1

Copy the template

If you have not already: cp .env.example .env

2

Set required variables

VariableDescription
APP_URLPublic URL of your instance (e.g. http://localhost:3000 locally, or your production domain).
DATABASE_URLPostgres connection string. Docker and desktop set this automatically; manual install uses port 5438 by default.
GITHUB_APP_IDGitHub App ID from your app settings.
GITHUB_APP_PRIVATE_KEYPEM private key. Use \n for newlines inside .env.
GITHUB_WEBHOOK_SECRETWebhook secret from the GitHub App.
GITHUB_APP_SLUGApp slug — used for the install URL in the dashboard.
OPENROUTER_API_KEY / ANTHROPIC_API_KEY / GROQ_API_KEYSet one AI provider key, or configure OPENAI_BASE_URL for Ollama or another OpenAI-compatible endpoint.
3

Optional: GitLab and Bitbucket

Add GITLAB_CLIENT_ID and GITLAB_CLIENT_SECRET, or BITBUCKET_CLIENT_ID and BITBUCKET_CLIENT_SECRET, only if you connect those providers. Self-hosted GitLab: set GITLAB_BASE_URL.


STEP 3

Deploy for production

Webhooks require a URL that GitHub, GitLab, or Bitbucket can reach from the internet.

1

Production server

Docker: run docker compose up -d --build on your server with APP_URL set to your public HTTPS URL.

Manual: build and start the production server behind your reverse proxy (nginx, Caddy, etc.):

Production
npm run build
npm run start
2

Local development with a tunnel

Start a tunnel to your local port, then add the public hostname to your config.

ngrok
ngrok http 3000
cloudflared
cloudflared tunnel --url http://127.0.0.1:3000

Set ALLOWED_DEV_ORIGINS to your tunnel hostname (e.g. abc123.ngrok-free.app). Update APP_URL if needed. GitClaw reloads configuration on save.

3

HTTPS

Git providers expect HTTPS webhook endpoints in production. Terminate TLS at your load balancer or reverse proxy before traffic reaches GitClaw.


STEP 4

Connect providers

Open the dashboard at APP_URL and go to Integrations.

1

GitHub

  1. Create a GitHub App with pull request and repository contents read permissions.
  2. Set the webhook URL to https://<your-host>/api/github/webhook.
  3. Set GITHUB_APP_SLUG in .env and restart if needed.
  4. In the dashboard, click Connect GitHub and install the app on your repositories.
2

GitLab

  1. Create a GitLab OAuth application with callback https://<your-host>/api/gitlab/callback.
  2. Authorize from the dashboard.
  3. Add the webhook URL shown on the integration card to your project (merge request events).
3

Bitbucket

  1. Create a Bitbucket OAuth consumer with callback https://<your-host>/api/bitbucket/callback.
  2. Authorize from the dashboard.
  3. Add the webhook URL shown on the integration card to your repo (pull request events).

STEP 5

Run your first review

Once a provider is connected, GitClaw reviews pull requests automatically.

1

Open or update a pull request

GitClaw listens for PR open and update webhooks. It diffs only what changed since the last review, so follow-up commits do not re-review the entire PR.

2

Read inline comments and summary

Findings appear as inline comments on the PR plus a summary. Categories include security, performance, and maintainability.

3

Reply with @gitclaw

Mention @gitclaw in a PR comment to ask follow-up questions in context.

4

Tune per repo (optional)

Add a .gitclaw.yaml in any repository to set ignore paths, review tone, and custom instructions. Track activity from the dashboard overview and analytics pages.