npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

opencode-prs

v0.5.3

Published

OpenCode TUI plugin that shows GitHub pull requests referenced by the current session

Readme

opencode-prs

OpenCode TUI plugin that lists GitHub pull requests opened by the current session.

The sidebar section is collapsible. Each pull request uses a full-width linked title with its muted repository#number and status word below: approved, approved · blocked, or waiting for open pull requests, draft, or merged. A pull request with merge conflicts shows conflicts instead, draft or not. The blocked label appears when GitHub reports an approved pull request cannot merge once its checks are done, for example when a required approval is missing. Every status word uses one color, so the words carry the meaning on their own. When the line is too narrow, the repository name shortens first (tool…#39), so the number, status, comments and checks stay visible. Open pull requests also show unresolved review comments and a checks indicator: ✓ passing, × failing, ◌ pending. Merged pull requests fold into one ▸ 3 merged line under the open ones; click it to list them in subdued colors, so open work stays prominent. Hover a clipped title to scroll through its full text once. Click a status line to copy that PR as a Slack-ready summary, or ⧉ in the header to copy the open and draft ones, confirmed with a toast. The count in the header is the open and draft PRs too.

On opencode 2, /prs (or clicking the PRs header) opens a panel beside the conversation with every PR of the session at full width: title, repo#number, status, unresolved comments, diff size, and for open PRs the failing and running checks by name plus a ✓ 397 passing, 56 skipped of 462 line. Keys while the panel has focus: j/k or arrows move, enter or o opens the PR in the browser, c copies it for Slack, C copies the open and draft ones, r refreshes, f toggles full screen, q or esc closes. Clicking a row selects it, clicking a title opens it. The ▼ on the sidebar header still folds the section.

Install

OpenCode 2, in ~/.config/opencode/cli.json:

{ "plugins": ["opencode-prs"] }

OpenCode 1, in ~/.config/opencode/tui.json:

{ "plugin": ["opencode-prs"] }

Then restart OpenCode. The plugin requires an installed and authenticated GitHub CLI.

How it works

The plugin finds successful gh pr create calls made by the session, plus REST fallbacks that POST to gh api repos/<owner>/<repo>/pulls. It fetches every pull request of a session in one GraphQL request through gh, and falls back to the REST API per pull request when GraphQL fails, for example when its rate limit is exhausted. Closed pull requests are hidden, while merged pull requests remain visible behind the fold. The sidebar shows up to ten pull requests, ordered by open, draft, then merged, with the newest first in each group; merged ones only take the rows the active ones leave free.

A forked session only lists pull requests created after the fork. Messages copied from the parent keep their original timestamps, so anything older than the fork itself is skipped.

Results are cached by session. Switching tabs shows the previous result immediately and revalidates GitHub data in the background. The active tab refreshes statuses every thirty seconds without replacing unchanged rows. The panel reads the same cache, so opening it costs no extra request.

Checks come from GitHub's own rollup rather than from listing every check: the rollup state gives the sidebar indicator, its per-state counts give the passing and skipped totals, and a filtered checkRuns query on each check suite gives the names of the failing and running ones. GitHub's merge state also tells us when an approved PR is blocked from merging. A PR with hundreds of checks would take multiple pages to list them all.

One published package supports OpenCode 1 and OpenCode 2.

Development

pnpm typecheck
pnpm test