Skip to main content

Textual TUI that lists GitHub PRs awaiting your review and hands them off to Claude Code.

Project description

cc-pr-reviewer

PyPI Downloads uv Ruff

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.

cc-pr-reviewer screenshot

What it does

  • gh search prs --review-requested=@me --state=open fetches 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 press Enter to open a confirmation modal; on Enter/y it clones the repo (if needed), checks out the PR branch via gh pr checkout, and launches claude inside that working tree with a prompt that invokes the PR Review Toolkit agents. See Keybindings for the full list.

Prerequisites

All prerequisites are validated at startup via check_prereqs(); the TUI refuses to launch until they're satisfied.

  1. GitHub CLI — installed and logged in.
    gh auth login
    
  2. Claude Code — the claude CLI must be on your PATH.
  3. 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
  4. git — on your PATH (used for git fetch on 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 Confirm, then clone + checkout + launch Claude Code review
d View full diff
o Open PR in browser
m Toggle inclusion of PRs you authored
f Filter the list by repo (picker)
r / F5 Refresh the list
q Quit

Inside the confirmation modal: Enter / y to proceed, Esc / n / q to cancel, p to toggle post-inline (instruct Claude to publish the findings as inline PR review comments via gh api, grouped under one review). The toggle defaults to on each time the modal opens; the chosen value is printed before Claude launches.

Inside the filter modal: arrow keys to move, Enter to apply the highlighted repo (or pick (any repo — clear filter) to remove the filter), r to re-fetch the unfiltered PR list and pick up repos that appeared after boot, Esc to cancel. The repo list comes from the most recent unfiltered fetch — applying a filter doesn't shrink the picker. The active filter is persisted in $GH_PR_WORKSPACE/.review_state.db and restored on the next launch.

How the Claude launch works

When you press Enter on a row, a confirmation modal shows the target PR (repo#N + title). On Enter/y 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.

--permission-mode acceptEdits is always passed so file-edit prompts don't interrupt the review — the same mode you get with shift+tab inside a Claude session.

If the modal's post-inline checkbox (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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cc_pr_reviewer-0.5.0.tar.gz (76.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cc_pr_reviewer-0.5.0-py3-none-any.whl (20.7 kB view details)

Uploaded Python 3

File details

Details for the file cc_pr_reviewer-0.5.0.tar.gz.

File metadata

  • Download URL: cc_pr_reviewer-0.5.0.tar.gz
  • Upload date:
  • Size: 76.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","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

Hashes for cc_pr_reviewer-0.5.0.tar.gz
Algorithm Hash digest
SHA256 290ed08f000a07efd899f156ece911302e6870f68f95c5b6f50ecc2d2487abbc
MD5 fd80def94300672b96265960b8aac90a
BLAKE2b-256 04b49ed4fc11a602cb0929635b7e131cb7de1684ff9d23a7280dec5d1326d37a

See more details on using hashes here.

File details

Details for the file cc_pr_reviewer-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: cc_pr_reviewer-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 20.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","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

Hashes for cc_pr_reviewer-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e78a0122d32fa89bf947e72a20579ab7197369f0ad0019e7822ab267a44a46b6
MD5 6e492483cb7f191620af65359a1d9003
BLAKE2b-256 030bab50b44cbaaff034b3f2c7ce3eeec289fd1907477f7f304b09f10ca64663

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page