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.
Metadata
Release files for prcat 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| prcat-0.1.0.tar.gz | 14.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| prcat-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 24.9 kB
Release files / prcat-0.1.0.tar.gz
| Download URL | prcat-0.1.0.tar.gz |
|---|---|
| Size | 14.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4aaa630266f785e2a60487321bf16033215c03937bcd799b261185a28632448a
|
|
BLAKE2b-256 checksum How to use checksums |
b9617e7b93361eda9ad60f6ea14d6c61419d4f54ebb01e488731558b8306ac24
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.3
|
Release files / prcat-0.1.0-py3-none-any.whl
| Download URL | prcat-0.1.0-py3-none-any.whl |
|---|---|
| Size | 10.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ec140c1f045005dfa964e54ddf6441cc33f08fe8d96cf2675d162e56a5522e52
|
|
BLAKE2b-256 checksum How to use checksums |
c9230a7e721748e96f2e8a0e14868d8fbea978935f225e12f1eb9992c9eda8b6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.3
|