Skip to main content
There is no standalone mergewatch CLI (npx mergewatch@latest). MergeWatch is managed with Docker Compose for self-hosted deployments and with pnpm + sam scripts for deploying the SaaS stack from the mergewatch.ai repo.

Self-Hosted: Docker Commands

Self-hosted MergeWatch runs from a single docker-compose.yml that starts the server, Postgres, and the dashboard.
CommandDescription
docker compose up -dStart MergeWatch, Postgres, and the dashboard in the background
docker compose downStop and remove all containers
docker compose pullPull the latest container images
docker compose logs -f mergewatchTail the MergeWatch server logs
docker compose logs -f dashboardTail the dashboard logs
docker compose logs -f postgresTail the Postgres logs
docker compose psShow running container status
docker compose restart mergewatchRestart the MergeWatch server
Use docker compose pull && docker compose up -d to upgrade to the latest version. Docker recreates only containers whose images have changed.

SaaS / AWS: Repository Scripts

Deploying the AWS stack (API Gateway + Lambda + DynamoDB + Bedrock) is done by cloning mergewatch.ai and running the scripts defined in package.json.
git clone https://github.com/santthosh/mergewatch.ai.git
cd mergewatch.ai
pnpm install

Deploy scripts

ScriptWhat it does
pnpm run deployBuild and deploy the stack (defaults to prod stage) via scripts/deploy.sh
pnpm run deploy:devDeploy to the dev stage
pnpm run deploy:stagingDeploy to the staging stage
pnpm run deploy:guidedRun sam deploy --guided for first-time setup
pnpm run setup-ssmSeed SSM parameters for GitHub App credentials and webhook secret
pnpm run setup-webSeed SSM parameters consumed by the dashboard

Log tailing (SaaS)

ScriptWhat it does
pnpm run logs:webhookTail the Webhook Lambda logs via sam logs
pnpm run logs:agentTail the ReviewAgent Lambda logs via sam logs
For ad-hoc filtering, use the AWS SAM CLI directly:
sam logs --name mergewatch-review-agent-prod --stack-name mergewatch --tail --filter "ERROR"
sam logs --name mergewatch-webhook-prod --stack-name mergewatch --tail --start-time "5min ago"

Development scripts

ScriptWhat it does
pnpm devRun all packages in watch mode (turbo)
pnpm buildBuild all packages
pnpm typecheckTypecheck all packages
pnpm testRun the full test suite
pnpm web:devStart the dashboard locally (Next.js)
The repository requires Node.js ≥ 20 and pnpm 10.23.0 (pinned via packageManager in package.json).

Next steps

Self-Hosted Install

Set up MergeWatch with Docker Compose.

Environment Variables

See all environment variables for both deployment modes.