A Python CLI tool for managing GitHub pull request comments - designed to be both human and AI agent friendly.
- Sync PR comments - Fetch all threads/comments for the current PR
- Filter threads - List comments by author type, state, or custom criteria
- Reply to comments - Post replies directly from the command line
- Check for new comments - Find comments newer than a specific timestamp
- Agent-ready - JSON output and structured data for AI automation
pipx install prprOr with pip:
pip install prpr- Python 3.10 or higher
- GitHub CLI (
gh) installed and authenticated - Working in a GitHub repository with pull requests
-
Sync PR comments to local storage:
prpr sync
-
List all comments:
prpr ls --json
-
Filter comments by author type:
prpr ls --author ai_bot --json
-
Show only open threads:
prpr ls --open --json
-
Reply to a comment:
prpr reply THR_1234567890 "Thanks for the review!" -
Check for new comments since a timestamp:
prpr check-new --since 2025-07-09T12:00:00Z
Create a ~/.prpr.toml file to customize behavior:
ai_author_patterns = [
"dependabot[bot]",
"renovate[bot]",
"github-actions[bot]",
"codecov[bot]",
"custom-bot"
]Fetches all threads/comments for the current PR and saves them to .prpr/threads.json.
Requirements:
- Must be in a Git repository
- Must be on a PR branch or have GitHub CLI able to detect the current PR
- GitHub CLI must be installed and authenticated
Exit codes:
0- Success9- GitHub CLI not found10- API failure11- Invalid arguments or not in a PR branch
Lists and filters PR comments.
Options:
--author TEXT- Filter by author type (self,teammate,ai_bot)--open- Show only open (unresolved) threads--json- Output as JSON (default shows abbreviated format)
Examples:
# Show all AI bot comments as JSON
prpr ls --author ai_bot --json
# Show only open threads
prpr ls --open
# Show open AI bot comments
prpr ls --author ai_bot --open --jsonPosts a reply to a specific comment thread.
Arguments:
THREAD_ID- The thread ID (e.g.,THR_1234567890)MESSAGE- The reply message
Example:
prpr reply THR_1234567890 "LGTM! Thanks for the fix."Lists comments created after the specified timestamp.
Options:
--since TEXT- ISO timestamp (e.g.,2025-07-09T12:00:00Z)
Example:
prpr check-new --since 2025-07-09T12:00:00ZComments are stored in .prpr/threads.json with the following structure:
{
"schema_version": "0.1.0",
"pr": 123,
"updated_at": "2025-07-10T18:00:00Z",
"threads": [
{
"id": "THR_1234567890",
"file": "src/app.py",
"line": 42,
"state": "open",
"author_login": "alice",
"author_type": "teammate",
"body": "This could be improved...",
"created_at": "2025-07-09T12:34:56Z"
}
]
}git clone https://github.com/source-medium/prpr.git
cd prpr
poetry install# Run all tests
poetry run pytest
# Run with coverage
poetry run pytest --cov=prpr
# Run specific test types
poetry run pytest tests/unit/
poetry run pytest tests/integration/# Format code
poetry run black prpr/
poetry run ruff format prpr/
# Check linting
poetry run ruff check prpr/
poetry run black --check prpr/MIT License - see LICENSE file for details.
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Ensure all tests pass and coverage is ≥90%
- Submit a pull request
- Support for multiple VCS platforms
- Comment scoring and priority system
- Live watch mode for new comments
- Integration with popular code review tools
- Enhanced filtering and search capabilities