← Catalog

@chmouel/pi-pr

Pi extension: /pr command and footer status for the GitHub pull request of the current branch

Package

Install

Install with PiG

pig install npm:@chmouel/pi-pr

Install with Pi

pi install npm:@chmouel/pi-pr
Review before installing

Packages 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.

{
  "extensions": [
    "./extensions/pr.ts"
  ]
}

README

Written by the package's publisher, shown as published in version 0.3.3 (README.md). PiG does not review it.

pi-pr

A pi extension that shows the GitHub pull request for the current branch, like Copilot CLI's /pr.

screenshot of the footer status and /pr table

Install

pi install npm:@chmouel/pi-pr
pi install git:github.com/chmouel/pi-pr   # straight from git

You need the gh CLI installed and authenticated.

What you get

A status line under pi's footer, refreshed when a session starts, every minute, after each agent run, and as soon as you switch branch:

●  PR #122 · 1 pending · review required ·   · +4084-17 · feat: Sync Vocabulary…

A merged or closed PR stays on screen for a day, then the line clears. When gh is missing or not logged in, the line says so instead of going blank. A checkout whose remote is not GitHub (GitLab, Codeberg, no remote) gets no line and no complaint, and /pr tells you there is nothing for gh to look at.

The line carries the CI state, a clickable PR #N (OSC 8 hyperlink), the CI tally, the review decision, each reviewer's state, merge conflicts, the diff size, and the PR title. The title sits last, so it is the part pi truncates when the terminal is narrow.

Reviewer states use Nerd Font Octicons for approved, changes requested, commented, requested and dismissed. Copilot gets its own glyph.

Commands

CommandDoes
/prPrint a summary table: state, branch, URL, changes, reviews, CI
/pr checksPrint each check with its result
/pr openOpen the PR in the browser
/pr refreshRefresh the footer status

The summary lands in the transcript as a card. It is not sent to the model.

Finding the PR

gh pr view answers first. If it reports no PR, the extension falls back to gh pr list --head <branch>, which finds a PR opened from a different remote than the one the branch tracks. That case shows up when you push straight to the upstream repository while the branch tracks your fork.

Credits

The polling cadence, the branch-change watch, the one-day retention for merged PRs, the gh missing and gh not logged in states, and the control-character and hyperlink-capability guards come from @narumitw/pi-github-pr. Its plain-text status line is what led to this extension growing a command and a transcript card on top.

Similar packages

PackageScope
@narumitw/pi-github-prShows PR review, check and comment status. Closest overlap with this extension.
@henryqw/pi-pr/pr command that finds, creates, updates and merges PRs, then fixes CI from review feedback.
pi-prsPulls review feedback into the agent and watches PRs.
@pikibun/pi-pr-flowDrives a change through the PR lifecycle, draft first, ready later.
@sfroment/pi-gh-cli, @procedures/ghWrap the gh CLI as tools, no PR status line.

Use this one for the footer status, the transcript table and the fork-aware lookup. Use @henryqw/pi-pr if you want the agent to act on the PR rather than display it.

Development, releasing and layout notes live in DEVELOPER.md.

License

Apache-2.0