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-export-html

v0.1.3

Published

Export OpenCode sessions to self-contained HTML files

Readme

opencode-export-html

A plugin for OpenCode that adds /export-to-html — export any conversation to a self-contained HTML file using the same SolidJS renderer as OpenCode's live share pages.

Why?

OpenCode's /share uploads conversations to the cloud. This plugin gives you the same visual output, fully offline — a single .html file you can open in any browser, share as an attachment, or archive.

What it looks like

The exported HTML is rendered by the exact same SolidJS components that power opncd.ai share pages — user messages, assistant responses, reasoning blocks, tool calls (bash, read, write, edit, grep, glob, task, etc.), code blocks with syntax highlighting (Shiki), math (KaTeX), diffs, todos, file attachments, and cost/token summaries.

Format

Exported files are self-extracting archives: session data, CSS, and JS are zstd-compressed and embedded in the HTML. At page load, a tiny bootstrap script (~11 KB, inlined uncompressed) decompresses everything client-side with fzstd. The final .html file is ~2.8 MB (down from ~21 MB uncompressed).

Installation

opencode plugin --global opencode-export-html

Usage

TUI (slash command)

Type /export-to-html in an OpenCode session. The plugin fetches the current session via OpenCode's local HTTP API, wraps everything into a self-extracting HTML file, and saves it to the project root (e.g., my-project/my-session.html). Open it in any browser — no server, no network, no dependencies.

Development

bun run build   # bundles viewer + compresses assets (dist/)
bun run test    # Playwright visual-diff tests against live share page

The repo uses upstream/ as a git submodule pointing to anomalyco/opencode (dev branch). UI components are imported directly from upstream/packages/ui/src/ — no verbatim copies. Vite aliases redirect @opencode-ai/* and @solidjs/router imports to minimal stubs.

License

MIT