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

@virmont/opencode-viewer

v1.0.5

Published

Local GUI to browse your OpenCode sessions, messages, and tool calls from the SQLite database

Readme

opencode-viewer

Local GUI to browse your OpenCode sessions, messages, and tool calls from the SQLite database.

One command. No setup. Just run it.

bunx @virmont/opencode-viewer

What it does

Opens a local web UI to explore your OpenCode history stored in ~/.local/share/opencode/opencode.db:

  • Projects — all your git repos tracked by OpenCode
  • Sessions — conversation history per project, newest first
  • Messages — full thread with user/assistant messages
  • Tool calls — see every edit, read, bash, glob call with inputs/outputs
  • Subagents — interleaved in the timeline, click to drill in, back to return
  • Images — screenshots and attachments rendered inline with click-to-expand lightbox
  • Reasoning — model thinking in collapsible blocks
  • Patches, file attachments, compaction markers — all rendered

Requirements

  • Bun runtime (curl -fsSL https://bun.sh/install | bash)
  • OpenCode installed and used at least once

Usage

# Just run it — auto-opens browser
bunx @virmont/opencode-viewer

# Custom port
bunx @virmont/opencode-viewer -p 8080

# Custom database path
bunx @virmont/opencode-viewer --db /path/to/opencode.db

# Don't auto-open browser
bunx @virmont/opencode-viewer --no-open

# Show help
bunx @virmont/opencode-viewer --help

How it works

  1. Reads your local opencode.db SQLite database (read-only, never writes)
  2. Starts a lightweight Bun server on localhost:3456
  3. Serves a single-page HTML app — no build step, no dependencies
  4. All data stays local. Nothing leaves your machine.

Features

Three-panel layout

  • Left — Project list with colored indicators
  • Middle — Sessions for selected project, paginated
  • Right — Full message thread with all parts

Message parts rendered

| Part type | Rendering | |-----------|-----------| | text | Markdown-lite with code blocks | | reasoning | Collapsible thinking block | | tool | Tool name + status badge + input/output + execution time | | patch | Compact card with commit hash + changed files | | file | Attachment card, images rendered inline | | agent | Subagent pill badge | | step-finish | Muted cost/token summary line | | compaction | Context compacted separator |

Navigation

  • Click a subagent card to drill into its messages
  • Back button or Escape to return to parent session
  • Escape also deselects session/project
  • Click images for full-size lightbox

Stack

  • Runtime: Bun (for bun:sqlite and Bun.serve())
  • Frontend: Vanilla HTML/CSS/JS — zero dependencies, single file
  • Database: SQLite read-only via bun:sqlite
  • Total size: ~16KB packed

License

MIT