A single, self-contained, CDN-based web tool for browsing an opencode database — sessions, chat messages, tool calls, and statistics.
No build step. No local dependencies. Data is read locally in your browser and never uploaded.
- 🗄️ Session list — browse all sessions with title, date, cost, tokens, model, and working directory
- 🔍 Search — filter sessions by title, or by message content (with in-chat highlight);
Ctrl+Fsearches rendered chat text via the browser - 💬 Chat view — user/assistant messages rendered as markdown (incl. mermaid flowcharts), expandable tool calls, collapsible reasoning
- ⌨️ Timeline — per-session message-flow visualization (user / assistant / tool / error)
- 📊 Statistics — totals for sessions, messages, cost, tokens, plus breakdowns by project, agent, model, and activity
- 📥 Export markdown — export the current session (
Ctrl+E) or download all sessions
-
Open
opencode-db-viewer.htmlin any modern browser (double-click works;file://protocol).
-
Click Load Database and pick an
opencode.dbfile.- macOS:
~/Library/Application Support/opencode/opencode.db - Linux:
~/.local/share/opencode/opencode.db(or$XDG_DATA_HOME/opencode/opencode.db) - Windows:
%USERPROFILE%\.local\share\opencode\opencode.db(e.g.C:\Users\<name>\.local\share\opencode\opencode.db)
- macOS:
-
Select a session in the sidebar to view its chat.
sql.js, markdown-it, DOMPurify, and mermaid are loaded from a CDN, so an internet connection is needed on first use.
All processing happens locally in your browser via sql.js (SQLite compiled to WebAssembly). The database file is only read in memory — nothing is uploaded or sent to any server.
- A modern browser (Chrome 80+, Firefox 74+, Edge 80+, Safari 13.1+) — the app uses ES2020 features
- Internet access for the sql.js CDN
- Timestamps are stored in milliseconds.
- A message's visible content is assembled from its
partrows (part.data), not the message row itself. - Tool-call input/output live inside each tool part's
statefield.