tokentop agent plugin for OpenCode. Parses session data from both SQLite and JSON storage, reads multi-provider credentials, and provides real-time activity monitoring.
| Capability | Status |
|---|---|
| Session parsing | Yes (SQLite + JSON fallback) |
| Credential reading | Yes (multi-provider) |
| Real-time tracking | Yes |
| Multi-provider | Yes |
This plugin reads OpenCode's local data to extract:
- Sessions — parsed from SQLite database (
~/.local/share/opencode/opencode.db) with automatic JSON fallback for older installs - Credentials — reads OAuth tokens and API keys from
~/.local/share/opencode/auth.jsonand provider config from~/.config/opencode/config.json - Provider discovery — detects configured providers (Anthropic, OpenAI, Google Gemini, GitHub Copilot, OpenRouter, Antigravity, OpenCode Zen)
- Real-time monitoring — watches for session file changes to update the dashboard live
This plugin is bundled with tokentop — no separate install needed. If you need it standalone:
bun add @tokentop/agent-opencode| Type | Access | Paths |
|---|---|---|
| Filesystem | Read | ~/.local/share/opencode, ~/.config/opencode |
bun install
bun run build
bun test
bun run typecheckSee the Contributing Guide. Issues for this plugin should be filed on the main tokentop repo.
MIT