A real-time token cache hit rate visualizer plugin for the OpenCode TUI. Displays cache hit/miss stats, token distribution by role, model pricing, accumulated costs and savings, and supports collapsible panels, adaptive theming, multilingual UI (Chinese/English), and slash commands for runtime configuration. Current stable version 1.2.12. Requires @opencode-ai/plugin >=1.14.0, @opencode-ai/sdk >=1.14.0, @opentui/core >=0.2.0, @opentui/solid >=0.2.0, solid-js >=1.9.0. Ships TypeScript definitions.
npm install opencode-visual-cacheNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Imports and registers the Visual Cache plugin with optional configuration, then shows available slash commands.
Use import syntax. Set "type": "module" in package.json or use .mjs extension.
Prefer using /cache-currency slash command instead of static config.
Run: npm install -g opencode-visual-cache@latest and ensure OpenCode environment includes peer deps.
Use /cache-rate command to set custom exchange rate for accurate cost display.
Change to dynamic import(): const registerPlugin = await import('opencode-visual-cache');Run: npm install -g opencode-visual-cache@latest
Install peer deps: npm install -g @opencode-ai/plugin @opencode-ai/sdk @opentui/core @opentui/solid solid-js