Getting Started
Prerequisites
- Docker and Docker Compose
- A GitHub App (see GitHub App Setup)
- An API key for your chosen LLM provider
Install with the pre-built Docker image (recommended)
Released versions are published to GitHub Container Registry and Docker Hub on every tag.
1. Pull the image
# GitHub Container Registry
docker pull ghcr.io/vineethkrishnan/clearpr:latest
# …or Docker Hub
docker pull vineethnkrishnan/clearpr:latestPin to a specific version (:1.2.3), a minor (:1.2), or a major (:1) instead of :latest for production.
2. Configure environment
Create a .env file next to your compose file:
# Required
GITHUB_APP_ID=123456
GITHUB_PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----\n...PEM contents on one line, escape newlines as \\n...\n-----END RSA PRIVATE KEY-----"
GITHUB_WEBHOOK_SECRET=a-strong-random-secret-you-set-when-creating-the-app
# LLM Provider (choose one)
LLM_PROVIDER=anthropic
LLM_API_KEY=sk-ant-...
# Embedding (required for PR memory - use Voyage)
VOYAGE_API_KEY=pa-...
# Database (defaults work with the compose snippet below)
DATABASE_URL=postgresql://clearpr:clearpr@db:5432/clearpr
REDIS_URL=redis://redis:6379GITHUB_PRIVATE_KEY holds the contents of the .pem file you downloaded from GitHub, not a path to it. The easiest way to get it into .env:
# Bash: read the file and inject as a single env var (newlines preserved by shell)
echo "GITHUB_PRIVATE_KEY=\"$(cat path/to/clearpr.private-key.pem)\"" >> .env3. Run with Docker Compose
Save as docker-compose.yml alongside your .env:
services:
app:
image: ghcr.io/vineethkrishnan/clearpr:latest
ports:
- '3000:3000'
env_file: .env
environment:
- NODE_ENV=production
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
restart: unless-stopped
db:
image: pgvector/pgvector:pg16
volumes:
- pgdata:/var/lib/postgresql/data
environment:
POSTGRES_USER: clearpr
POSTGRES_PASSWORD: clearpr
POSTGRES_DB: clearpr
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U clearpr']
interval: 5s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
command: redis-server --appendonly yes
volumes:
- redisdata:/data
volumes:
pgdata:
redisdata:Start it:
docker compose up -d4. Verify
curl http://localhost:3000/health/live
# {"status":"ok"}Install the GitHub App on your repos, open a PR, and ClearPR will review it.
Install from source
Use this path if you need to modify the code, run the latest unreleased commits, or build your own image.
1. Clone the repository
git clone https://github.com/vineethkrishnan/clearpr.git
cd ClearPR2. Configure environment
cp .env.example .envFill in the same values as shown in the Docker image section above.
3. Start ClearPR
docker compose up -dThe bundled docker-compose.yml builds the app image from source.
4. Verify
curl http://localhost:3000/health/live
# {"status":"ok"}Development Setup
For local development without Docker for the app:
# Install dependencies
npm install
# Start only database services
docker compose -f docker-compose.dev.yml up -d
# Start in dev mode
npm run start:dev