git404hub

what is opencode-visual-cache fr?

hotakus/opencode-visual-cache — explained in plain English

Analysis updated 2026-05-18

37TypeScriptAudience · developerComplexity · 2/5LicenseSetup · easy

tl;dr

Sidebar plugin for the OpenCode terminal coding tool that shows real time prompt cache hit rate, token breakdown, session cost, and money saved.

vibe map

mindmap
  root((opencode-visual-cache))
    Inputs
      OpenCode SDK
      Model pricing
      Token events
    Outputs
      Hit rate gauge
      Token breakdown
      Session cost
    Use Cases
      Tune prompt caching
      Track spend per session
      Pick a cheaper model
    Tech Stack
      TypeScript
      OpenCode plugin API
      npm

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

what do people make with this?

VIBE 1

Monitor prompt cache hit rate while coding with OpenCode to keep it above 85 percent

VIBE 2

Track per session AI spend in USD, CNY, EUR, JPY, GBP, or KRW

VIBE 3

See how tokens split between system prompt, user input, tool calls, and tool results

what's the stack?

TypeScriptOpenCodenpm

how it stacks up fr

hotakus/opencode-visual-cacheimgoodbai/mapgogogojavlonbek1233/greenroom
Stars373737
LanguageTypeScriptTypeScriptTypeScript
Setup difficultyeasymoderateeasy
Complexity2/53/51/5
Audiencedevelopergeneralvibe coder

Figures from each repo's GitHub metadata at analysis time.

how do i run it?

Difficulty · easy time til it works · 5min

OpenCode caches the first installed plugin version, so upgrading requires clearing the plugin cache before reinstalling.

MIT license: free to use, modify, and redistribute with attribution and no warranty.

in plain english

OpenCode Visual Cache is a plugin for OpenCode, a terminal coding tool, that shows how often the model's prompt cache is being hit while you work. The README, written in Chinese, frames it as a sidebar panel that updates in real time. Alongside the cache hit rate, it displays a breakdown of tokens read from cache, written to cache, missed, and produced as output, plus the running session cost and how much money the cache has saved you so far. The panel also shows pricing information for the current model, including input, cache read, and cache write unit prices, all pulled dynamically from the provider configuration. There is a separate breakdown that estimates how many tokens are being spent on system prompts versus user input, agent instructions, tool calls, and tool results. Each section of the panel can be collapsed or hidden, and the plugin remembers the collapsed state between restarts. Colors come from the OpenCode theme and are desaturated automatically, with the hit rate value going green above 85 percent, orange above 70 percent, and red below 70 percent. Installing is described two ways. The recommended path is to press Ctrl plus P inside OpenCode, search for install plugin, type opencode-visual-cache@latest, and press enter. The manual path is npm install -g opencode-visual-cache@latest, then editing ~/.config/opencode/tui.jsonc to list the plugin. After a restart the sidebar panel appears in any session. The plugin adds four slash commands. /cache-currency switches the displayed currency between USD, CNY, EUR, JPY, GBP, and KRW, with default exchange rates filled in. /cache-rate lets you set a custom exchange rate. /cache-section toggles which subsections and the outer border are visible. /cache-config shows the current configuration. All changes take effect immediately and persist. The README notes a known OpenCode issue that locks the plugin to the version first installed, and gives the commands to clear the OpenCode plugin cache on Windows or on macOS and Linux before reinstalling. Language can be forced to English by setting the CACHE_TUI_LANG environment variable to en. The plugin is described as model agnostic and works with any AI model OpenCode supports, since token and pricing data come through the standard OpenCode SDK interface. License is MIT.

prompts (copy fr)

prompt 1
Install opencode-visual-cache and explain what each panel section in the sidebar means
prompt 2
Set CACHE_TUI_LANG to en and switch the displayed currency to EUR with a custom exchange rate
prompt 3
Fork opencode-visual-cache and add a CSV export of the per session token and cost breakdown
prompt 4
Diagnose why the opencode-visual-cache panel is stuck on an old version and reset the OpenCode plugin cache on macOS

Frequently asked questions

what is opencode-visual-cache fr?

Sidebar plugin for the OpenCode terminal coding tool that shows real time prompt cache hit rate, token breakdown, session cost, and money saved.

What language is opencode-visual-cache written in?

Mainly TypeScript. The stack also includes TypeScript, OpenCode, npm.

What license does opencode-visual-cache use?

MIT license: free to use, modify, and redistribute with attribution and no warranty.

How hard is opencode-visual-cache to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is opencode-visual-cache for?

Mainly developer.

peek the repo → explain another one

This repo across BitVibe Labs

double-check against the repo, no cap.