Skip to content
    ↑↓ select↵ openesc close
    English中文
    taraksh01

    Oc Usage

    v1.0.0Observability
    @taraksh011/oc-usage

    OpenCode plugin — live token usage, cost, and TPS display

    GitHub stars

    1

    Monthly installs

    93

    7 in 7 days

    Composite scoreSCORE

    33.6

    Multi-signal model

    Last commit

    23 days ago

    2026-07-27

    Install and configure

    opencode.json

    Writes 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"]
    }

    opencode 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.