Usage Examples
Real-world examples of pr-review in action.
Basic review
terminal
# Full interactive flow
pr-reviewReview staged changes
Run before committing to get quick feedback on what you're about to commit:
terminal
# Review staged changes before committing
git add -p
pr-review --stagedSecurity-focused review
terminal
# Security-focused review using Gemini Pro
pr-review --provider=gemini --model=pro --focus=security
# Use the most capable Claude model
pr-review --provider=claude --model=claude-opus-4-6 --focus=securityCompare custom branches
terminal
# Compare feature branch against develop (non-interactive)
pr-review --provider=claude --model=claude-haiku-4-5 --base=develop
# The source branch will be auto-detected as your current branchGit pre-push hook
Automatically review before pushing:
.git/hooks/pre-push
# Use in a pre-push git hook
# .git/hooks/pre-push
#!/bin/sh
pr-review --staged --provider=claude --model=claude-haiku-4-5 --output=pre-push-review.md
cat pre-push-review.mdGitHub Actions CI
Integrate into your CI pipeline:
.github/workflows/review.yml
# CI pipeline example (GitHub Actions)
- name: AI PR Review
run: |
git checkout ${{ github.head_ref }}
pr-review \
--provider=claude \
--model=claude-haiku-4-5 \
--base=${{ github.base_ref }} \
--output=review-${{ github.run_number }}.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}