npx mergewatch@latest init wizard automates the entire setup: creating a GitHub App, storing credentials, and deploying infrastructure via AWS SAM.
Most users arrive here from Quickstart. Make sure you have completed the Prerequisites before continuing.
What the wizard creates
The wizard deploys the following infrastructure to your AWS account:| Resource | Details |
|---|---|
| API Gateway | HTTPS endpoint that receives GitHub webhooks |
| WebhookHandler Lambda | Node.js 20.x, ARM64, 256 MB memory, 30 s timeout |
| ReviewAgent Lambda | Node.js 20.x, ARM64, 1024 MB memory, 300 s timeout |
| SQS FIFO Queue | Ensures sequential review processing per pull request |
| DynamoDB Tables | mergewatch-installations and mergewatch-reviews |
| SSM Parameters | Encrypted credentials stored under /mergewatch/{stage}/ |
Run the install wizard
Start the wizard
prod, staging). The stage name scopes all resources so you can run multiple environments side by side.Create the GitHub App
The wizard opens your browser to GitHub’s app manifest flow. This creates a dedicated GitHub App under your account or organization.What happens during the manifest flow:
- Your browser opens the GitHub App registration page with a pre-filled manifest
- You review the app name, permissions, and webhook events
- You click Create GitHub App
- GitHub redirects back to the CLI with the app credentials
Credentials are stored in SSM
The wizard automatically stores three secrets in AWS SSM Parameter Store, encrypted with your account’s default KMS key:
You can verify the stored parameters at any time:
| Parameter | Type | Description |
|---|---|---|
/mergewatch/{stage}/github-app-id | String | The numeric GitHub App ID |
/mergewatch/{stage}/github-private-key | SecureString | RSA private key for authenticating as the App |
/mergewatch/{stage}/github-webhook-secret | SecureString | HMAC secret for validating webhook payloads |
All
SecureString parameters are encrypted at rest using AWS KMS. The Lambda functions decrypt them at runtime via IAM policies scoped to these specific parameter paths.SAM build and deploy
The wizard runs
sam build and sam deploy automatically. This takes 2-3 minutes on a typical connection.Verify the deployment
Run the built-in health check to confirm everything is working:Install the GitHub App on your repositories
After deploying, install the GitHub App so MergeWatch can receive webhook events from your repositories.- Open the installation URL printed by the wizard (or find your app at GitHub Settings > Developer settings > GitHub Apps)
- Click Install App
- Choose All repositories or select specific ones
- Click Install
Your first pull request
Open a pull request against any installed repository. MergeWatch picks it up automatically. What to expect:- The
WebhookHandlerLambda receives thepull_request.openedevent and enqueues it to the SQS FIFO queue - The
ReviewAgentLambda picks up the message, fetches the diff from GitHub, and sends it to Amazon Bedrock - A review comment appears on the pull request within 1-3 minutes
- A summary of the changes
- File-by-file findings posted as inline review comments
- A risk rating (low, medium, high)
The first invocation of each Lambda may experience a cold start, adding 5-10 seconds. Subsequent reviews are faster.
Next steps
Configure review behavior
Tune sensitivity, ignored paths, and review focus areas.
Manual install
Step-by-step instructions if you prefer to run each step yourself.
Bring Your Own Cloud
Use your own AWS account for Bedrock model access and cost control.
CLI reference
Full list of CLI commands including health, status, and logs.
