Features
- fzf-powered picker — fuzzy-search unresolved review threads by file, author, or date with a live diff-hunk preview.
- Rich previews — code context with optional Markdown rendering via
glowormdcat. - Copy modes — copy the full comment, Markdown, URL, or body only straight to your clipboard.
- Open anywhere — jump to the comment in your browser or to
file:linein your editor with a single keypress. - Interact inline — reply, resolve, and unresolve threads without leaving the terminal.
- Pre-filter on launch — narrow by file path/regex, author, or date range before the picker even opens.
Install
From a local checkout:
gh extension install .Or directly from GitHub:
gh extension install kud/gh-pr-commentsRequirements: gh, jq (>= 1.6), fzf. Optional: glow or mdcat for Markdown rendering; pbcopy / xclip / xsel for clipboard support.
# macOS
brew install gh jq fzf glow
# Ubuntu/Debian
sudo apt install -y gh jq fzf xclipUsage
$ gh pr-comments # infer repo and current PR
$ gh pr-comments 42 # browse PR #42
$ gh pr-comments -R owner/repo # target a specific repository
$ gh pr-comments -f src -a @alice # pre-filter by file and author
$ gh pr-comments --since 2024-01-01 --until 2024-03-31
$ gh pr-comments --resolved # browse resolved threads
$ gh pr-comments --sort date # sort by newest firstInside the fzf picker:
| Keys | Action |
|---|---|
| Enter / Ctrl-Y | Copy full comment |
| Ctrl-M | Copy as Markdown |
| Ctrl-U | Copy URL |
| Ctrl-O | Open in browser |
| Ctrl-E | Jump to file:line in editor |
| Ctrl-R | Reply inline |
| Ctrl-] / Ctrl-\ | Resolve / unresolve thread |
| Alt-A / Alt-O / Alt-S | Toggle all comments / outdated / sort |
| ? | Toggle help overlay |
Development
git clone https://github.com/kud/gh-pr-comments.git
cd gh-pr-comments
gh extension install .Bypass live GitHub calls during development by injecting a GraphQL result:
GH_REVIEW_PR_JSON=/path/to/graphql.json ./gh-pr-comments 123 -R owner/repo --json