A command-line tool to fetch and display unresolved GitHub PR comments for the current branch. Super usefule for LLM software development workflows. Or just to see a nice command line view of whats going on.
npm install -g pr-comments-cli- Create a GitHub Personal Access Token with
reposcope at https://github.com/settings/tokens - Set the token in your environment:
Or create a
export GITHUB_TOKEN=your_token_here.envfile in your project root:GITHUB_TOKEN=your_token_here
Navigate to your git repository and run:
pr-commentsOptions:
-d, --dir <path> Specify the git repository directory (default: current directory)
-h, --help Show this help message
Examples:
# Show help
pr-comments --help
# Check PR comments in a specific directory
pr-comments --dir /path/to/repoThe tool will:
- Detect your current branch
- Find the associated pull request
- Display all unresolved comments with their context
- Shows unresolved PR comments only
- Displays comment author and timestamp
- Shows file path and line numbers when available
- Includes diff context when available
- Works with GitHub repositories
PR Comments CLI works great with AI coding assistants like Windsurf and Cursor. Here's how you can integrate it into your workflow:
Simply ask Windsurf or Cursor to run pr-comments to get a list of all unresolved PR comments. and to organize and work through them
A typical workflow might look like:
- Run
pr-commentsto see all unresolved feedback - Ask your AI assistant to help you understand and implement the suggested changes
- Make the necessary code modifications with AI assistance
- Run tests to ensure your changes work as expected
- Push your changes and mark the comments as resolved
This workflow helps you leverage AI tools to more efficiently address code review feedback, improving both productivity and code quality.
- Node.js >= 14
- A GitHub repository with pull requests
- A GitHub Personal Access Token
MIT