repo-review

CLI code review agent built on Vercel Sandbox. The project for the Vercel Sandbox course on Vercel Academy.

Branches

  • start (this one) — project scaffold. Dependencies and tooling are set up; src/ is empty. You build the CLI lesson by lesson.
  • complete — the finished implementation matching the end of lesson 5.4. Check it out if you get stuck or want to compare.
git checkout complete   # see the finished version
git checkout start      # back to the scaffold

Setup

pnpm install
cp .env.example .env
# Fill in VERCEL_TOKEN, VERCEL_TEAM, and AI_GATEWAY_API_KEY in .env

Then head to Section 1: Sandbox Foundations → Your First Sandbox in the course and start building.

What you'll build

A CLI named repo-review that takes a GitHub URL, clones the repo into an isolated Vercel Sandbox, runs the test suite, generates a structured AI review with openai/codex-5.3, and prints a severity-sorted combined report.

By the end of the course, src/ will contain:

  • sandbox-lifecycle.ts — Sandbox creation, clone, file collection, test run
  • cli.ts — commander setup, URL validation, pipeline orchestration
  • analyze.ts — Zod-backed structured AI review with generateObject
  • test-runner.ts — failure parser + package-manager detection
  • reporter.ts — severity-sorted, CI-aware output

Tech stack