AI-powered PR reviewer — understand any pull request in seconds
Project description
prcat
AI-powered PR reviewer — understand any pull request in seconds.
$ prcat https://github.com/django/django/pull/17842
PR #17842: Fix queryset annotation with complex expressions
django/django feature/fix-annotation → main +85/-12 6 file(s)
Verdict: Needs minor changes ⚠️
## Summary
This PR fixes a bug where annotating a queryset with complex F() expressions
containing subqueries would fail under certain database backends...
## Concerns
- [WARNING] src/db/models/sql/compiler.py L342
The fallback path for non-standard backends isn't covered by tests.
## Questions for author
- Does this fix apply to GROUP BY queries with aggregates?
## Suggested review comment
The fix looks correct. I'd like to see a test for the SQLite fallback path
before merging. Otherwise LGTM.
Install
pip install prcat
Set an API key (or use Ollama for local, free review):
export ANTHROPIC_API_KEY=your-key # Claude (default)
export OPENAI_API_KEY=your-key # or OpenAI
# or use --provider ollama # local, no API key needed
Authenticate with GitHub (required to fetch private PRs):
gh auth login # uses gh CLI — recommended
# or: export GITHUB_TOKEN=your-token
Usage
# Review by PR number (auto-detects repo from git remote)
prcat 42
# Explicit repo
prcat owner/repo#42
# Full URL
prcat https://github.com/owner/repo/pull/42
# Review styles
prcat 42 --style summary # just summarize the PR
prcat 42 --style risks # focus on risks only
prcat 42 --style review # full review (default)
# Use different AI providers
prcat 42 --provider openai
prcat 42 --provider ollama --model qwen2.5:7b
# Copy review to clipboard
prcat 42 --copy
# Save to file
prcat 42 --output review.md
# Compact mode (for CI / scripts)
prcat 42 --compact # exits 1 if CRITICAL issues found
Options
| Flag | Description |
|---|---|
--style |
review (default), summary, or risks |
--provider |
claude (default), openai, ollama |
--model |
Override default model |
--no-comments |
Skip fetching existing PR comments |
--compact |
One-line output, exit 1 on CRITICAL |
--copy |
Copy review to clipboard |
--output FILE |
Save review to file |
Use in CI
Exit code 1 when the AI finds CRITICAL issues — perfect for CI gates:
# .github/workflows/pr-review.yml
- name: AI PR review
run: prcat ${{ github.event.pull_request.number }} --compact
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Developer workflow
prcat fills the missing piece in the git-workflow toolkit:
# Start the day
standup-ai # generate standup from git commits
# Before you push
critiq # review YOUR own changes before pushing
# When you submit a PR
gpr # generate PR description + commit message
# When you review a teammate's PR ← prcat fits here
prcat 42 # AI-assisted review of their changes
# After merging
gitbrief --changed-only # pack context for LLM
changelog-ai v1.0.0 v1.1.0 # generate CHANGELOG
chronicle repo # understand the story behind changes
| Tool | When | What it does |
|---|---|---|
| standup-ai | Morning | Generate daily standup from commits |
| critiq | Before push | Review YOUR own code |
| gpr | Commit/PR | Generate PR descriptions + commit messages |
| prcat | PR review | Review TEAMMATES' pull requests |
| gitbrief | PR prep | Pack codebase context for LLMs |
| changelog-ai | Release | Generate CHANGELOG from git history |
| chronicle | Explore | Understand stories behind git history |
Default models
| Provider | Default model |
|---|---|
| Claude | claude-haiku-4-5 |
| OpenAI | gpt-4o-mini |
| Ollama | qwen2.5:1.5b |
Override with --model:
prcat 42 --provider claude --model claude-sonnet-4-5 # deeper review
prcat 42 --provider openai --model gpt-4o # OpenAI GPT-4o
prcat 42 --provider ollama --model qwen2.5:7b # larger local model
License
MIT — free for personal and commercial use.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file prcat-0.1.0.tar.gz.
File metadata
- Download URL: prcat-0.1.0.tar.gz
- Upload date:
- Size: 14.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4aaa630266f785e2a60487321bf16033215c03937bcd799b261185a28632448a
|
|
| MD5 |
1f7451d8af386726d8d03489077b0e23
|
|
| BLAKE2b-256 |
b9617e7b93361eda9ad60f6ea14d6c61419d4f54ebb01e488731558b8306ac24
|
File details
Details for the file prcat-0.1.0-py3-none-any.whl.
File metadata
- Download URL: prcat-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ec140c1f045005dfa964e54ddf6441cc33f08fe8d96cf2675d162e56a5522e52
|
|
| MD5 |
8a85072f1f083a605a696862a81da046
|
|
| BLAKE2b-256 |
c9230a7e721748e96f2e8a0e14868d8fbea978935f225e12f1eb9992c9eda8b6
|