In short: prbot is a CLI that uses Claude, GPT, or Cursor to review pull requests on Azure DevOps, GitHub, or Bitbucket. It posts structured feedback as PR comments, including inline feedback on specific lines. Configure once, run prbot review 42, and get AI-powered code reviews aligned with your team's standards.
Code reviews are critical for software quality — but they’re often slow, repetitive, and inconsistent.
What if a CLI tool could:
- Fetch your PR
- Apply your team’s coding standards
- Send everything to Claude, GPT, or Cursor
- Post structured feedback directly on the PR
That’s what prbot does.
prbot does exactly that. It's a lightweight CLI that fetches PR metadata and diffs from your source control platform, sends them to an AI (Claude, GPT, or Cursor), and posts the review as comments—including inline feedback on specific lines.
Why prbot?
How It Works
- prbot fetches PR metadata and diffs from your source control platform.
- It loads your
CodeStandard.md. - It sends structured input to the selected AI provider (Claude, GPT, or Cursor).
- The AI returns schema-validated JSON.
- prbot posts the review as structured PR comments (including inline feedback).
No servers. No webhooks. Just a CLI.
| Feature | Description |
|---|---|
| Multi-platform | Azure DevOps, GitHub, and Bitbucket Cloud |
| Your standards | Reviews against a custom CodeStandard.md file |
| Choice of AI | Claude (Anthropic), GPT (OpenAI), or Cursor Cloud Agents |
| Inline comments | Issues posted on the exact lines of code |
| Replace mode | Re-run reviews and replace old AI comments with fresh ones |
| Zero infrastructure | Just a CLI; no servers or webhooks to manage |
Quick Start
# Clone and install
git clone https://github.com/mrlokeshagarwal/pr-bot.git
cd pr-bot
npm install
npm run build
# Make it global (optional)
npm link
Setup in 3 Steps
1. Choose your platform
| Platform | Repo format | Auth |
|---|---|---|
| GitHub | owner/repo |
Personal Access Token |
| Azure DevOps |
repo-name or GUID |
PAT |
| Bitbucket | workspace/repo-slug |
App Password |
GitHub:
prbot set platform github
prbot set repo owner/repo
prbot set github-token # Prompts for your token
Azure DevOps:
prbot set platform ado
prbot set org https://dev.azure.com/YourOrg
prbot set project YourProject
prbot set repo YourRepo
prbot set pat # Prompts for PAT
Bitbucket:
prbot set platform bitbucket
prbot set repo workspace/repo-slug
prbot set bitbucket-token
2. Add your coding standard
Create a CodeStandard.md with your team's guidelines. prbot sends this to the AI so reviews align with your rules.
prbot set standard C:\path\to\CodeStandard.md
3. Configure AI
# Claude (default)
prbot set provider claude
prbot set claude-key
# Or OpenAI
prbot set provider openai
prbot set openai-key
prbot set model gpt-4o
Run a Review
# Review PR #42
prbot review 42
# Dry run (see output without posting)
prbot review 42 --dry-run
# Replace old AI comments with a fresh review
prbot review 42 --replace
Tip: Use
--dry-runon production PRs first to verify the output before posting comments.
What You Get
Each review includes:
| Section | Description |
|---|---|
| Summary | High-level overview of the changes |
| Risk assessment | Potential issues or concerns |
| Questions | Clarifications the AI suggests |
| Issues | Specific findings with severity, file, line, and code snippets |
All comments are prefixed with [AI Review] so you can easily identify and filter them.
Tech Stack
| Technology | Purpose |
|---|---|
| TypeScript | Type-safe, modern JavaScript |
| Node.js 18+ | Native fetch, no extra HTTP libs |
| Commander | CLI framework |
| Zod | Schema validation for AI responses |
| diff | Unified diff generation for Azure DevOps |
Get Started
GitHub: github.com/mrlokeshagarwal/pr-bot
git clone https://github.com/mrlokeshagarwal/pr-bot.git
cd pr-bot
npm install && npm run build
prbot status # Verify setup
Project Status
This is an early-stage project. The code has not been formally tested across all platforms and edge cases. Use with caution on production PRs—consider running with
--dry-runfirst to verify output before posting comments.
Disclaimers
Trademarks: Azure DevOps, GitHub, and Bitbucket are trademarks of their respective owners. Claude, GPT, and Cursor are trademarks of Anthropic, OpenAI, and Cursor, respectively. This project is not affiliated with or endorsed by Microsoft, GitHub, Inc., Atlassian, Anthropic, OpenAI, or Cursor.
Terms of Service: Use of prbot is subject to the terms of service of the AI providers (Anthropic, OpenAI, Cursor) and source control platforms (Azure DevOps, GitHub, Bitbucket) you connect to. Ensure your usage complies with their respective policies.
If you use Azure DevOps, GitHub, or Bitbucket and want consistent, AI-assisted code reviews, give prbot a try.
⭐ Star the repo if you find it useful
💬 Feedback and contributions are welcome
Top comments (0)