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

pi-studio-opencode

v0.3.1

Published

OpenCode plug-in adaptation of pi-studio with a browser-based two-pane Studio workspace

Readme

pi-studio-opencode

OpenCode plug-in adaptation of the pi extension pi-studio.

It provides a local browser-based Studio workspace for OpenCode, with an editor on the left and response/preview on the right.

If you use pi itself, use the original pi-studio. This repo is for OpenCode.

Status

Usable and actively improving.

The main goal is a good OpenCode version of Studio rather than full feature parity with pi-studio.

Features

  • Launch Studio with /studio
  • Attach Studio to the current OpenCode session, or create one if needed
  • Two-pane editor + response/preview workspace
  • Run, queue steering, stop, and browse response history
  • Raw response, rendered response preview, and editor preview
  • Load and save local files
  • Markdown / QMD / LaTeX preview with practical support for:
    • math fallback
    • Quarto-style callouts
    • preview page-break markers
    • local PDF figure preview via pdf.js
  • PDF export of the right-pane preview via pandoc + xelatex
  • Theme-aware Studio UI based on the active OpenCode theme
  • Footer/status info, pane focus controls, and response highlighting inspired by pi-studio

Install

Recommended:

npx pi-studio-opencode@latest install

That configures OpenCode globally, so /studio is available in all your OpenCode projects.

If you only want /studio in the OpenCode project you are currently in:

npx pi-studio-opencode@latest install --project

If you use Bun instead of npm:

bunx pi-studio-opencode@latest install
bunx pi-studio-opencode@latest install --project

Optional: if you want pi-studio-opencode available as a normal shell command:

npm install -g pi-studio-opencode
pi-studio-opencode install

Then fully restart OpenCode and run:

/studio

The install step updates both OpenCode config files for you:

  • opencode.json for the server plugin
  • tui.json for the TUI plugin

Manual config

If you prefer to edit config yourself, add this to either:

  • .opencode/opencode.jsonc and .opencode/tui.json
  • ~/.config/opencode/opencode.json and ~/.config/opencode/tui.json
  • ~/.config/opencode/opencode.jsonc and ~/.config/opencode/tui.jsonc
{
  "$schema": "https://opencode.ai/config.json",
  "plugin": ["pi-studio-opencode@latest"]
}
{
  "$schema": "https://opencode.ai/tui.json",
  "plugin": ["pi-studio-opencode@latest"]
}

Notes

  • /studio opens a browser-based Studio attached to the current OpenCode session, or creates one if needed.
  • /studio is a built-in slash action provided by the TUI plug-in; it will not appear unless the plug-in is also present in tui.json.
  • If /studio gets sent to the model as ordinary text, the plug-in probably did not load, or you still have a stale command.studio entry from an older install. Rebuild or reinstall the package, remove that legacy command entry if needed, then fully restart OpenCode.
  • After updating the plug-in, open a fresh Studio browser tab rather than reusing an older one.
  • Advanced launcher flags are best used with the standalone CLI or PI_STUDIO_OPENCODE_LAUNCH_ARGS.
  • --base-url, --session, and --directory are taken from the active OpenCode session during /studio.
  • The Studio UI is external to OpenCode; it is not an embedded pane.
  • Preview and PDF quality depend on local tooling:
    • pandoc for preview/PDF workflows
    • xelatex for PDF export

Standalone launcher

You can also launch the browser surface directly:

pi-studio-opencode --directory "/path/to/project"

or:

npx pi-studio-opencode --directory "/path/to/project"

To attach manually to an existing OpenCode server/session:

pi-studio-opencode --base-url "http://127.0.0.1:4096" --session "<session-id>" --directory "/path/to/project"