Install
Install with PiG
pig install npm:@scriptdude/pi-mergerInstall with Pi
pi install npm:@scriptdude/pi-mergerPackages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.
Pi manifest JSON
The pi field of package.json.
{
"image": "https://raw.githubusercontent.com/dimitritholen/pi-merger/main/docs/screenshot.png",
"extensions": [
"./index.ts"
]
}README
Written by the package's publisher, shown as published in version 0.2.0 (README.md). PiG does not review it.
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.

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