Skip to main content
In this guide, we’re building a code review agent (like CodeRabbit or Greptile) with Upstash Box. We clone a repo, inspect the PR diff, and return structured findings with severity and suggested fixes.

1. Installation

Set your environment variables:
.env

2. Create the reviewer

scripts/review-pr.ts

3. Run the reviewer


4. Use in CI

Save the JSON result from your reviewer script, then fail the CI job when changes are required.
scripts/check-review-result.ts
This gives you an automated gate similar to CodeRabbit or Greptile, running inside an isolated, durable Box.