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-native-pi

v2.0.0

Published

Bridge OpenCode CLI free models into Pi using native server-event streaming and Pi-native tool handoff

Readme

opencode-native-pi

opencode-native-pi

Use OpenCode's login-free models inside Pi with native SSE streaming and Pi-owned tool execution. Slash command: /opencode-native-pi. Provider ID: opencode-cli.

Requirements

  • Pi Coding Agent 1.3.x
  • OpenCode 2.1+ on PATH (opencode --version); 1.x and 2.0 are unsupported
  • No OpenCode login needed for the bundled free models

Install

pi install npm:opencode-native-pi
pi install -l npm:opencode-native-pi                       # project-local
pi install git:github.com/ebysofyan/opencode-native-pi     # git source

Then /reload or restart Pi and pick an opencode-cli model with /model.

Commands

/opencode-native-pi          Read-only TUI panel; status outside TUI
/opencode-native-pi status   Cached status and registered models
/opencode-native-pi models   List model IDs
/opencode-native-pi update   Refresh catalog and capabilities
/opencode-native-pi test     Smoke-test instructions
/opencode-native-pi help     Configuration help

Configuration

| Variable | Purpose | |---|---| | OPENCODE_NATIVE_PI_BIN | Executable path; default opencode | | OPENCODE_NATIVE_PI_MODELS | Comma/space-separated model IDs; missing prefix defaults to opencode/ |

Explicit model IDs skip startup discovery and start with conservative text-only metadata; /opencode-native-pi update enriches them with catalog capabilities and costs. Without an override, discovery registers active models with zero input/output cost, falling back to bundled IDs if lookup fails.

How it works

Each turn starts a private authenticated opencode serve on loopback with isolated config/data directories (no global plugins or credentials), replays the Pi transcript, system prompt and tool schemas, streams text/reasoning/tool-input events into Pi, then tears the session and server down. OpenCode is blocked from executing tools; only declared Pi tools with confirmed blocked handoffs come back to Pi. Failures are visible: unknown or executed tools, incomplete handoffs, reasoning-only replies and broken streams fail the turn.

No XML tool markers, JSON repair, server pool or cross-turn session cache. Turn timeout defaults to 180 s (Pi's timeoutMs).

Privacy

The bridge runs the real OpenCode engine and never extracts login tokens or calls model providers directly, but prompts, tool results and images do reach the selected model service. Free-model providers may retain inputs; don't send confidential or patient data without checking their current policies.

Development

npm test              # build + node:test
npm pack --dry-run

License

MIT. Derived from the upstream 1.5.0 Pi extension by luongnv89 and pi-extensions contributors; original copyright retained in LICENSE.