OpenCode · local · open source

opencode-viewer-extender

A local web GUI to browse, edit, and export your OpenCode sessions, messages, and tool calls from the SQLite database — with a small plugin API you can extend. Everything stays on your machine.

bunx @homescriptone/opencode-viewer-extender

What you get

Install

Requires Bun and OpenCode used at least once.

# run it (auto-opens the browser)
bunx @homescriptone/opencode-viewer-extender

# enable edit mode
bunx @homescriptone/opencode-viewer-extender --write

# custom port / database
bunx @homescriptone/opencode-viewer-extender -p 8080 --db /path/to/opencode.db

Write a plugin

Plugins register features through a tiny API and are auto-discovered from public/plugins/.

OCV.define({
  id: "my-plugin",
  name: "My plugin",
  setup(api) {
    api.registerExportFormat({
      id: "txt", label: "Plain text (.txt)",
      extension: "txt", mime: "text/plain",
      build: ({ session, messages }) => "..."
    });
    api.registerBulkAction({
      id: "wipe", label: "Delete selected",
      danger: true, write: true,
      handler: async ({ projectIds, host }) => {}
    });
  }
});

Data & safety

The database is opened read-only by default. Writes require --write. Deletes cascade and cannot be undone — back up opencode.db first. Nothing leaves your machine.

Credits

Maintained by Homescriptone Solutions Ltd. Built on opencode-viewer by its original author leeweisern — thank you.