← Projects
Open source

gh-pr-comments

Browse and triage unresolved GitHub PR review threads from your terminal with fzf

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 glow or mdcat.
  • 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:line in 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-comments

Requirements: 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 xclip

Usage

$ 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 first

Inside the fzf picker:

KeysAction
Enter / Ctrl-YCopy full comment
Ctrl-MCopy as Markdown
Ctrl-UCopy URL
Ctrl-OOpen in browser
Ctrl-EJump to file:line in editor
Ctrl-RReply inline
Ctrl-] / Ctrl-\Resolve / unresolve thread
Alt-A / Alt-O / Alt-SToggle 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