The PR review CLI tool fetches GitHub PR review comments using the GitHub GraphQL API, organizing them into threaded conversations with resolved/outdated status. By default, it shows only unresolved, non-outdated threads to focus on actionable feedback.
go install github.com/AObuchow/pr-review-cli@latestgit clone https://github.com/AObuchow/pr-review-cli
cd pr-review-cli
go build -o pr-review-cliThe binary will be installed to your $GOPATH/bin directory (typically ~/go/bin), which should be in your PATH.
You need a GitHub personal access token to use this tool. You can provide it in two ways:
-
Environment variable (recommended):
export GITHUB_TOKEN=your_github_token_here -
Command line flag:
pr-review-cli fetch --token your_github_token_here [other options]
Fetch PR review threads with Claude-optimized format (default):
pr-review-cli fetch --owner AObuchow --repo Eclipse-Spectrum-Theme --pr 2Default Behavior: Shows only unresolved, non-outdated review threads. This focuses on actionable feedback that needs to be addressed.
Control which threads are included in the output:
By default, resolved threads are hidden. Include them with:
pr-review-cli fetch --owner AObuchow --repo Eclipse-Spectrum-Theme --pr 2 --include-resolvedThreads on outdated code are hidden by default. Show them with:
pr-review-cli fetch --owner AObuchow --repo Eclipse-Spectrum-Theme --pr 2 --include-outdatedOnly inline code review threads are shown by default. Include general PR discussion comments with:
pr-review-cli fetch --owner AObuchow --repo Eclipse-Spectrum-Theme --pr 2 --include-generalCombine multiple flags to see all feedback:
pr-review-cli fetch --owner AObuchow --repo Eclipse-Spectrum-Theme --pr 2 --include-resolved --include-outdated --include-generalThe tool supports three output formats:
Optimized for Claude AI analysis:
pr-review-cli fetch --owner AObuchow --repo Eclipse-Spectrum-Theme --pr 2 --format claudePretty-printed format for terminal viewing:
pr-review-cli fetch --owner AObuchow --repo Eclipse-Spectrum-Theme --pr 2 --format humanRaw JSON output for programmatic use:
pr-review-cli fetch --owner AObuchow --repo Eclipse-Spectrum-Theme --pr 2 --format jsonUsing environment variable for authentication:
export GITHUB_TOKEN=ghp_your_token_here
# Get unresolved threads only (default)
pr-review-cli fetch --owner microsoft --repo vscode --pr 123
# See all feedback including resolved and outdated
pr-review-cli fetch --owner facebook --repo react --pr 456 --include-resolved --include-outdated
# Human-friendly format with visual indicators
pr-review-cli fetch --owner facebook --repo react --pr 456 --format human
# Include general PR discussion comments
pr-review-cli fetch --owner microsoft --repo vscode --pr 123 --include-generalUsing token flag:
pr-review-cli fetch --owner AObuchow --repo Eclipse-Spectrum-Theme --pr 2 --token ghp_your_token_here --format jsonGet general help:
pr-review-cli helpGet help for specific commands:
pr-review-cli fetch --helpThe tool organizes PR feedback into threaded conversations with status indicators:
- Review threads: Grouped conversations on specific code lines
- Thread status:
[RESOLVED] ✓or[UNRESOLVED]markers - Outdated indicator:
⚠️ [OUTDATED]for threads on changed code - Reply tracking: Shows conversation flow with reply indicators
- General comments: Optional non-code PR discussion (use
--include-general)
- Comment content and conversation threads
- File locations and line numbers in the diff
- Reviewer information
- Timestamps
- Enhanced summary statistics:
- Unresolved thread count
- Resolved thread count
- Outdated thread count
- Files affected
- Authors
The output format varies by option:
- Claude format: Optimized for AI analysis with clear action items
- Human format: Terminal-friendly with emojis and visual indicators (✅/❌/
⚠️ ) - JSON format: Complete structured data for programmatic use
This repository includes a custom Claude command that makes it easy to fetch PR comments directly from a GitHub PR URL. To use it in your own repository:
- Copy the
.claude/commands/fetch-pr-comments.mdfile to your repository's.claude/commands/directory - Make sure you have the
pr-review-clitool installed (see Installation section above) - Set your
GITHUB_TOKENenvironment variable
Then you can use the command in Claude Code:
/fetch-pr-comments url:https://github.com/AObuchow/Sample-Commander/pull/1
This will:
- Parse the PR URL to extract owner, repo, and PR number
- Fetch unresolved, non-outdated review threads (actionable feedback only)
- Format the output for Claude to analyze and help address the feedback
Why Default Filtering? By showing only unresolved threads, Claude focuses on feedback that actually needs your attention, making the workflow more efficient.
-
Get actionable PR feedback:
/fetch-pr-comments url:https://github.com/your-org/your-repo/pull/123 -
Claude will fetch and display unresolved threads, then you can ask Claude to help:
- "Help me address the performance concerns raised in the review"
- "Fix the code style issues mentioned in the comments"
- "Explain how to resolve the security vulnerability pointed out"
-
To see all feedback including resolved/outdated:
pr-review-cli fetch --owner your-org --repo your-repo --pr 123 --include-resolved --include-outdated