| .claude | ||
| .vscode | ||
| reviews | ||
| .gitignore | ||
| NOTES.md | ||
| pra | ||
| README.md | ||
PRAssistant - AI-Powered Code Reviews
Your AI-Powered Code Review Assistant
PRAssistant is a command line tool that provides AI-powered branch reviews of your codebase. Under the hood, PRAssistant utilizes git diff and OpenAI's GPT-3.5-turbo and GPT-4 to review your code and provide feedback on your changes.
PRAssistant is best used before you stage and commit your code to your codebase. PRAssistant also supports full branch diff PR feedback as if it were an engineer reviewing your merge request (see --branch-review flag). PRAssistant is designed to help you catch bugs, improve your code quality, and help you ship with confidence.
Features
-
View all commands, options and examples
pra --help
-
Run against local changes
pra
-
Run pra against a branch and create a PR review
pra --branch-review main
-
Choose which files to review
- Only .py and .js files
pra --only .py .js
- Everything except .py and .js files
pra --ignore .py .js
- Defaults to [".py", ".c", ".cpp", ".java", ".cs", ".php", ".vb", ".html", ".css", ".js", ".ts", ".asp", ".aspx", ".cfm", ".cgi", ".pl", ".cer", ".htm", ".xhtml", ".shtml", ".jsp", ".jsx", ".tsx", ".vue", ".solid", ".toml", ".md", ".go", ".rs", ".swift"]
- Only .py and .js files
-
Summarize the git diff for a commit message or PR description
pra --summarize
-
Dry run mode to see what would be reviewed without making API calls
pra --dry-runpra --thorough --branch-review main --dry-run
-
Debug mode for verbose output including list of files being reviewed
pra --debugpra --thorough --debug --only .py .js
-
Export review results to JSON file for programmatic processing
pra --export-json review.jsonpra --thorough --branch-review main --export-json report.json --summarize- Output includes metadata (timestamp, files changed, review mode) and structured review data
-
Override the default prompts with your own custom prompt
pra --prompt "Below is a git diff of code. Please review and notify only of critical issues. If there are no critical issues, respond with tons of checkbox emojis"
-
Example command combos
- 'Review on .py and .js files only'
pra --only .py .js
- 'Review for production-critical UI code'
pra --model gpt-4 --only .js .jsx .tsx .vue
- 'Review on a fullstack app excluding .tsx files'
pra --model gpt-4 --ignore .tsx
- 'Run a custom prompt against git diff with summary'
pra --prompt "Below is a git diff of code. Please review and notify only of critical issues." --summarize
- 'Quick comparison against staging branch with summary'
pra --branch-review staging --model gpt-3.5-turbo --summarize
- 'Review of all .ts files'
pra --only .ts
- 'Reviews with a bash alias'
- Add this line to your
.bashrcor.bash_profilealias review="pra --model gpt-4 --summarize"
- Then, whenever you want a review, just run
review
- Add this line to your
- 'Review on .py and .js files only'
Install & Use
-
Install or switch to Python 3.11 or 3.10 or 3.9 or 3.8
- Check your python version
python --version
- Check your python version
-
Make changes to your codebase
-
Run pra
pra
Compare local changes
-
Before you stage and commit, run pra
pra
-
Implement the feedback from pra
-
Commit your code with confidence
Compare branch changes
-
Before you merge, run pra
pra --branch-review main
-
Implement the feedback from pra
-
Merge your code with confidence