@taraksh011/oc-usageOpenCode plugin — live token usage, cost, and TPS display
1
93
7 in 7 days
33.6
Multi-signal model
23 days ago
2026-07-27
Install and configure
opencode.jsonWrites to this project's opencode.json — applies to this repository only.
opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@taraksh011/oc-usage@1.0.0"]
}Writes to ~/.config/opencode/opencode.json — applies to every project.
~/.config/opencode/opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@taraksh011/oc-usage@1.0.0"]
}If you want to modify the plugin locally, install it into the project and reference the local path.
shell
pnpm add -D @taraksh011/oc-usageopencode loads npm dependencies through its embedded runtime on startup and caches them locally — no manual global install needed.
OpenCode TUI plugin — displays per-session token usage, cost, and TPS in the prompt bar.
↑1.2K [450] ↓3.5K [2.1K] $0.0214 ⚡45 ∅38
↑ total [current]— input tokens (cumulative / last message)↻ total [current]— cache read tokens (cumulative / last message)↓ total [current]— output tokens including reasoning (cumulative / last message)$cost— total session cost⚡tps— instant tokens/sec (1s rolling window)∅ tps— average tokens/sec (across streaming duration)
Data persists across restarts via TuiKV.
Install
// ~/.config/opencode/tui.jsonc
{
"plugins": ["@taraksh011/oc-usage"]
}
Then restart OpenCode.