Textual TUI that lists GitHub PRs awaiting your review and hands them off to Claude Code.
Project description
cc-pr-reviewer
A small Textual TUI that lists every open GitHub PR where you are a requested reviewer, and hands the selected PR off to Claude Code with the PR Review Toolkit plugin driving the review.
What it does
gh search prs --review-requested=@me --state=openfetches your review queue across every repo you have access to.- Displays them in a scrollable table (repo, number, title, author, age, draft flag).
- Keyboard-driven: pick a PR and either
- Enter / c — clones the repo (if needed), checks out the PR branch
via
gh pr checkout, and launchesclaudeinside that working tree with a prompt that invokes the PR Review Toolkit agents. - d — full-screen
gh pr diffviewer. - o — open the PR in your browser.
- m — include PRs you authored in the list.
- a — toggle auto-accept (pass
--permission-mode acceptEditsto Claude so file-edit prompts don't interrupt the review). - p — toggle post-inline (instruct Claude to publish the findings
as inline PR review comments via
gh api, grouped under one review). - r / F5 — refresh.
- q — quit.
- Enter / c — clones the repo (if needed), checks out the PR branch
via
Prerequisites
All prerequisites are validated at startup via check_prereqs(); the TUI
refuses to launch until they're satisfied.
- GitHub CLI — installed and logged in.
gh auth login
- Claude Code — the
claudeCLI must be on yourPATH. - PR Review Toolkit plugin — installed and enabled inside Claude Code
(detected via
claude plugin list --json):claude plugin install pr-review-toolkit
Details: https://claude.com/plugins/pr-review-toolkit - git — on your
PATH(used forgit fetchon repeat reviews).
Install
As a global CLI (recommended)
Install from PyPI with uv or pipx:
uv tool install cc-pr-reviewer
# or
pipx install cc-pr-reviewer
Then run it from anywhere:
cc-pr-reviewer
From source (for development)
uv sync
uv run cc-pr-reviewer
# or
uv run python cc_pr_reviewer.py
Configuration
| Env var | Default | Meaning |
|---|---|---|
GH_PR_WORKSPACE |
~/gh-pr-workspace |
Where repos are cloned for local checkout. |
Clones are organised as $GH_PR_WORKSPACE/<owner>/<repo>, so a second
review of the same repo reuses the existing clone and just git fetches
before checking out the PR.
Keybindings
| Key | Action |
|---|---|
↑ / ↓ |
Move through PRs |
Enter / c |
Clone + checkout + launch Claude Code review |
d |
View full diff |
o |
Open PR in browser |
m |
Toggle inclusion of PRs you authored |
a |
Toggle auto-accept (--permission-mode acceptEdits) |
p |
Toggle post-inline (publish findings as inline PR comments) |
r / F5 |
Refresh the list |
q |
Quit |
The current state of the a and p toggles is shown in the status bar
and is also printed before Claude launches.
How the Claude launch works
When you press Enter on a row, the TUI suspends itself and runs, in order:
gh repo clone <owner>/<repo> # only if not already cloned
git fetch --all --prune # otherwise
gh pr checkout <N> --force
claude [--permission-mode acceptEdits] "<review prompt>"
The review prompt asks the PR Review Toolkit to run its six sub-agents (Comment Analyzer, PR Test Analyzer, Silent Failure Hunter, Type Design Analyzer, Code Reviewer, Code Simplifier). Because Claude Code starts in the PR's working tree, it has full file-level context.
If auto-accept (a) is on, --permission-mode acceptEdits is passed
so file-edit prompts don't interrupt the review — the same mode you get
with shift+tab inside a Claude session.
If post-inline (p) is on, the prompt is extended to ask Claude to
publish each finding as an inline review comment via a single
POST /repos/{owner}/{repo}/pulls/{n}/reviews call through gh api, so
they land grouped under one review.
When you /exit Claude, press Enter and the TUI returns.
Extending
A few natural next steps if you want to go further:
- Add filters (by org, by repo, by author) —
gh search prsalready accepts--owner,--repo,--author. - Cache the PR list to disk with a TTL so startup is instant.
- Add a "my authored PRs" tab (
--author=@me) to re-use the same UI for tracking your own open PRs. - Swap the hard-coded
REVIEW_PROMPTfor a couple of presets bound to different keys (e.g.tfor tests-only,sfor simplify-only).
Releasing
Releases are automated via two GitHub Actions workflows:
- Release (
.github/workflows/release.yml) —workflow_dispatchwith abumpinput (patch/minor/major). It runsuv version --bump, commitspyproject.toml+uv.lockaschore(release): X.Y.Z, tagsvX.Y.Z, pushes both tomain, and creates a GitHub release with auto-generated notes. Requires aRELEASE_TOKENsecret (PAT with Contents: read/write, allowlisted on branch protection so the bot can push tomain). - Publish to PyPI (
.github/workflows/publish.yml) — triggered byrelease: published. Builds sdist + wheel withuv build, validates withtwine check, and publishes viauv publish --trusted-publishing always. No token is stored; PyPI's Trusted Publisher config (pypi.org → Manage → Publishing) authorises this repo/workflow/environment (pypi) via OIDC.
To cut a release: go to Actions → Release → Run workflow, pick the bump type. When it finishes, the publish workflow runs automatically on the resulting GitHub release. Verify from a clean environment:
uv tool install cc-pr-reviewer
cc-pr-reviewer
Manual fallback (if you ever need to publish locally): uv build && uvx twine check dist/* && uv publish with UV_PUBLISH_TOKEN set to a PyPI
API token.
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 cc_pr_reviewer-0.2.1.tar.gz.
File metadata
- Download URL: cc_pr_reviewer-0.2.1.tar.gz
- Upload date:
- Size: 30.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
12a7d81d1bc740dcd9151e800ba96381314f5766b8ea961a6c9807cbc98f7083
|
|
| MD5 |
f084655ae386501aa903c7148c29eb79
|
|
| BLAKE2b-256 |
31ff8edf9333ed4b397ec9d9a0ea910949c22dc8126354a3358f7ec428405fa8
|
File details
Details for the file cc_pr_reviewer-0.2.1-py3-none-any.whl.
File metadata
- Download URL: cc_pr_reviewer-0.2.1-py3-none-any.whl
- Upload date:
- Size: 14.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5c5ec1029c8ecbfc55a07d2a48dbe289250d878ac7a911c744ed0bab86943680
|
|
| MD5 |
2296581ef84ddfcce527461a47bf0bc8
|
|
| BLAKE2b-256 |
69619e52324b55ec6324017785743de8c500e7c48ac1e922e2858e893f70244f
|