@scriptdude/pi-merger

pi extension: review, approve, merge and comment on open GitHub PRs from a full-screen TUI (via gh)

Packages

Package details

extension

Install @scriptdude/pi-merger from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@scriptdude/pi-merger
Package
@scriptdude/pi-merger
Version
0.2.0
Published
Nov 16, 2026
Downloads
414/mo · 414/wk
Author
scriptdude
License
MIT
Types
extension
Size
41.6 KB
Dependencies
0 dependencies · 2 peers
Pi manifest JSON
{
  "image": "https://raw.githubusercontent.com/dimitritholen/pi-merger/main/docs/screenshot.png",
  "extensions": [
    "./index.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

pi-merger

A pi extension that opens a full-screen TUI to review open GitHub pull requests. All PR data comes from the gh CLI.

pi-merger: file list on the left, diff of the selected file on the right

Install

pi install npm:@scriptdude/pi-merger
# or straight from GitHub: pi install git:github.com/dimitritholen/pi-merger

Then /reload in pi. Requires gh, logged in (gh auth login).

Use

Run pi inside a git repo with a GitHub remote, then press ctrl+shift+m or type /merger.

Starting pi in a folder that holds several repos (direct subfolders with a .git) works too: the start screen lists open PRs from all of them, and f opens a dropdown to focus on one repo.

Flow: PR list → changed files (file list left, diff preview right; stacked on terminals under 100 columns) → select hunks.

Key Action
↑↓ / jk move (PR, file, or hunk)
enter / → open PR · select hunks in the diff
pgup pgdn / space scroll the diff
n p next / previous file
c comment on the selected hunk: sends file path, hunk and comment to the model in the current session (not posted to the PR)
a approve (confirm first; gh pr review --approve). Blocked on your own PRs
m merge (confirm first; pick s squash, m merge commit, r rebase). Not for drafts
u update branch: merge base into the PR branch (confirm first; gh pr update-branch)
f choose repository (only when several repos were found)
v filter: All, Created by me, Assigned to me, Review requested from me
u choose users (PR authors): space shows/hides a user, a shows all (remembered until pi restarts)
r refresh the PR list
esc back
q / ctrl+c quit

Errors from gh (missing, not authenticated, GitHub refusals such as conflicts) show in the status line.

Limits

First 100 open PRs per repo. Repos are only searched one level down. No syntax highlighting. Single-line comments. The diff is re-fetched each time a PR is opened.

Develop

npm install, then npm test (diff parser and gh error handling) and npm run typecheck.

License

MIT