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

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=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 either
    • Enter / c — 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.
    • d — full-screen gh pr diff viewer.
    • o — open the PR in your browser.
    • m — include PRs you authored in the list.
    • a — toggle auto-accept (pass --permission-mode acceptEdits to 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.

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 / 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 prs already 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_PROMPT for a couple of presets bound to different keys (e.g. t for tests-only, s for simplify-only).

Releasing

For maintainers cutting a new PyPI release:

# bump version in pyproject.toml, then:
uv build                              # produces dist/*.whl and dist/*.tar.gz
uvx twine check dist/*                # sanity-check README rendering & metadata
uv publish                            # uploads to PyPI (needs UV_PUBLISH_TOKEN)

Get a PyPI API token from https://pypi.org/manage/account/token/ and set UV_PUBLISH_TOKEN (or pass --token). After publishing, verify from a clean environment:

uv tool install cc-pr-reviewer
cc-pr-reviewer

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.1.1.tar.gz (26.8 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.1.1-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cc_pr_reviewer-0.1.1.tar.gz
  • Upload date:
  • Size: 26.8 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

Hashes for cc_pr_reviewer-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b82fb5fa669217807b4d3932dc4a0bd303d8d9f86f11beedc84311db679f797d
MD5 daddde2841d958483cc5d46cc4b4fda3
BLAKE2b-256 70311e3de07b2f8aaa0b3aa7a0b462b1b6f9f8e48b61eca14007afb10ca62b1d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cc_pr_reviewer-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 10.8 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

Hashes for cc_pr_reviewer-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 831e91db06c86dea0b75dde6b89427994de7fb05350bfd8a0eb4c83d6d6da160
MD5 89f7f4bcd000da30e5b69948ce342161
BLAKE2b-256 ccbc253aedb72132e63c9351b5751062515338916411dcc6834b8f61e0d7d836

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