sdk/apps/examples/code-review-bot/README.md
An AI-powered code review dashboard for real GitHub pull requests. Paste a PR URL, inspect the actual changed files, stream an SDK-powered review over the real PR diff, and copy or optionally post the generated review.
<p align="center"> </p>Install dependencies:
bun install
bun run build:sdk
Set an API key:
export CLINE_API_KEY="cline_..."
Optionally set a GitHub token. Public PRs can be loaded without one, but a token is recommended for private repositories and higher rate limits:
export GITHUB_TOKEN="github_pat_..."
Run the dashboard:
bun dev
Open http://localhost:3457, paste a GitHub pull request URL, and click Run Review.
By default the app copies the generated review to your clipboard. To allow posting a summary comment back to GitHub, run with both GITHUB_TOKEN and:
export ENABLE_GITHUB_REVIEW_POSTING=1
get_file_context - reads full file contents from the PR head commit for surrounding contextadd_review_finding - records a structured finding with file, line, severity, category, and suggestionsubmit_review - a completion tool that ends the run with a summary and approve/request-changes decisioncreateTool definitions with zod schemaslifecycle: { completesRun: true } to make a tool end the agent loopsystemPrompt with structured instructionsFor a simpler starting point, see quickstart. For an interactive chat agent, see cli-agent.