Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

review

Fetch and display a PR diff in the terminal with syntax highlighting.

Full code review in your terminal — no browser needed.

When to Use

  • Deep dive: “I need to see the actual code”
  • Offline review: “No browser, but need to review”

Synopsis

prctrl review [OPTIONS] [PR_NUMBER]

Options

FlagDescriptionDefault
PR_NUMBERPR number to reviewRequired (or use --pr or --all)
-n, --pr-numbers <NUMS>PR number(s) to review (comma-separated)-
-p, --pr <NUM>Target specific PR by number-
-a, --allShow diffs for all pending reviewsfalse
-n, --dry-runPreview which PRs would be shown without displaying diffsfalse
-c, --context <NUM>Context lines around changes3
-o, --output <FILE>Output diff to fileTerminal
-l, --language <LANG>Language hint for syntax highlightingAuto-detected
-P, --priorityShow priority score (1-5 stars)false
--repo <PATTERN>Filter by repository (partial match, case-insensitive)-
--author <PATTERN>Filter by author (partial match, case-insensitive)-
-s, --since-days <DAYS>Only show PRs created since this many days ago-
--jsonOutput as JSON for scriptingfalse

Examples

prctrl review 4821
prctrl review 4821 --context 5
prctrl review --priority 4821
prctrl review 4821 --json
prctrl review --pr 4821 --output diff.patch
prctrl review --all
prctrl review --all --priority
prctrl review --all --repo myservice
prctrl review --all --author johndoe
prctrl review --all --repo api --author alice
prctrl review --pr-numbers 4821,4822,4823
prctrl review --pr-numbers 4821,4822 --priority
prctrl review --all --dry-run
prctrl review --pr 4821 --dry-run
prctrl review --all --since-days 7
prctrl review --all --repo api --since-days 14