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-github

v0.1.4

Published

GitHub pull requests inside the OpenCode v2 TUI

Downloads

696

Readme

opencode-github

Browse GitHub pull requests without leaving the OpenCode v2 TUI.

opencode-github adds a /prs command that opens a searchable, read-only dialog for the current Git repository. It uses the authenticated GitHub CLI for repository detection and pull request data.

Pull requests are prefetched when the TUI starts and refreshed in the background every minute, so opening /prs normally uses cached data.

OpenCode v2 and its TUI plugin API are beta. This release targets OpenCode 0.0.0-next-16741 exactly.

Requirements

  • OpenCode 0.0.0-next-16741, available as opencode2
  • Node.js 22.12 or newer
  • GitHub CLI authenticated with access to the current repository

Verify GitHub CLI access with:

gh api user --jq .login

Install

Add the package to ~/.config/opencode/cli.json:

{
  "plugins": [
    {
      "package": "opencode-github"
    }
  ]
}

Restart OpenCode after adding or updating a package plugin.

Use

Start OpenCode in a GitHub repository and run:

/prs

The pull request dialog supports keyboard navigation. Press Enter to view a pull request's title and description inside the dialog, then press d for the full pull request diff or c to browse its commits and Enter to view a commit diff. Press b from the pull request list or details view to copy its branch name, or press o from either view to open it in the default browser.

Develop

Install dependencies and create the initial build:

npm install
npm run build

Run the compiler in watch mode:

npm run dev

Register the absolute local build path in ~/.config/opencode/cli.json:

{
  "plugins": [
    {
      "package": "/absolute/path/to/opencode-github/dist/tui.js"
    }
  ]
}

Restart OpenCode after adding the plugin. You can then launch it normally from any repository:

cd /path/to/repository
opencode2

Local plugin builds are hot-reloaded by OpenCode. Restart the development TUI after changing dependencies or package configuration.

To test interactive changes, open a repository with open pull requests, run /prs, and verify searching, Up/Down navigation, Enter for details, d for the full pull request diff, c for commits, Enter for a commit diff, / to return to search, b to copy the branch in both pull request views, o to open the PR, and Escape/back behavior. After testing, replace the local path in cli.json with the published package entry.

Verify

npm run check
npm pack --dry-run

For OpenCode diagnostics:

OPENCODE_LOG_LEVEL=DEBUG opencode2

Installed OpenCode logs are written to ~/.local/share/opencode/log/opencode.log.

Releases

Every non-bot push to main creates the next patch release, publishes it to npm, tags the release, and creates a GitHub Release. Publishing uses npm trusted publishing with GitHub Actions OIDC, so no npm token is stored in GitHub.

Configure the opencode-github package's trusted publisher in npm before pushing the workflow: select GitHub Actions, enter organization vestia-dev, repository opencode-github, workflow filename release.yml, and allow npm publish.

The workflow updates both package.json and package-lock.json in its release commit. Its bot-authored push is excluded from triggering another release.

License

MIT