pr-review
v0.2.0
Published
AI-powered GitHub pull request review tool that adds /review command to AI agents.
Downloads
8
Readme
pr-review
A tool for reviewing GitHub pull requests using AI agents. It adds a /review command to AI agents, automating detailed pull request reviews.
Currently supports GitHub Copilot and Cursor. You can specify which AI agent to install prompts for using command-line options.
Features
- Automatically fetches and reviews pull request diffs
- Multi-faceted analysis covering code quality, bugs, security, performance, and more
- Support for Japanese and English review outputs
- Customizable review guidelines
Installation
Run the following command from the root directory of your repository:
# Install for GitHub Copilot (default)
npx pr-review
# Install for Cursor
npx pr-review --cursor
# Specify language
npx pr-review --copilot --lang jaThis command will add the .review directory and prompt templates to your project.
Usage with GitHub Copilot
Prerequisites
- GitHub CLI (
gh) must be installed and authenticated - GitHub Copilot must be installed in VS Code
- Your project must be a GitHub repository
How to Use
After installation, open GitHub Copilot Chat in Agent mode in VS Code
Run the
/reviewcommand:/reviewThis will automatically detect and review the pull request associated with the current branch.
Review a specific PR:
/review 123You can also specify a PR number to review.
Review Coverage
The /review command analyzes pull requests from the following perspectives:
- Functional and specification correctness
- Bug and regression risks
- Edge cases and error handling
- Security issues
- Performance and scalability
- Readability and maintainability
- Testing and validation
- Documentation alignment
- Dependency and configuration changes
Customization
You can add project-specific review guidelines by creating a .review/GUIDELINES.md file.
CLI Options
--copilot- Install prompts for GitHub Copilot (default)--cursor- Install prompts for Cursor--lang <locale>- Set the review language (e.g.,ja,en)-h,--help- Display help information
What the Installer Does
When you run npx pr-review:
- Creates a
.reviewdirectory for configuration - Copies prompt templates to the agent-specific directory based on the specified option (defaults to GitHub Copilot):
--copilotor default:.github/prompts--cursor:.cursor/commands
- Generates/updates the configuration file
.review/config.yml - Saves settings such as language preferences
License
Licensed under the Apache License, Version 2.0. See LICENSE for details.
