dsh-token-usage-observer
Run the following command in DeepSeek Harness:
dsh plugin install RyzenWang/dsh-token-usage-observer
Paste the following prompt into your AI chat to install this plugin:
Run dsh plugin install RyzenWang/dsh-token-usage-observer in your terminal to install this plugin; the source repository is at https://github.com/RyzenWang/dsh-token-usage-observer .
About this plugin
Running DeepSeek Harness, Codex, and OpenCode side by side means token usage is scattered across jsonl files and a SQLite database in separate directories. Knowing how much you burned this week, which requests cost the most, or whether your cache hit rate is improving used to mean hand-parsing logs and writing ad-hoc queries.
dsh-token-usage-observer unifies input (both cached and uncached), cache-write, and output token counts from all three sources, computes cache hit rates, and estimates costs with configurable per-million-token prices. It exposes a usage_stats agent tool that supports filtering by source, date range, category, and grouping dimension. In the WebUI, a Token Statistics sidebar dashboard provides stacked bar charts and a per-session detail list, with prices adjustable on the fly. The plugin only reads local logs and never mutates data.
Ideal for developers and teams that mix multiple LLM clients daily and need to track API spend, compare model or preset costs, and monitor cache efficiency. No local build step is required; install and restart the WebUI to start using it.
Use Cases
- Using multiple LLM clients at once and needing a unified view of token spend and cost
- Reviewing weekly or monthly API cost trends and cache-hit-rate changes
- Quantifying actual token costs across models and agent presets to guide selection
Best For
- Individual developers running Harness, Codex, and OpenCode in parallel
- Small teams that need to keep LLM API spend within budget
- Tech leads focused on cache efficiency and model cost-effectiveness
Related Plugins
A service-oriented sidebar framework for DSH, offering a full workbench with file explorer, embedded browser, real terminal, Git panel, and extensible plugin services.
A beautiful, practical Claude Code-style TUI plugin with pixel whale top bar, flowing glow title, real-time status line, streaming thought expansion, time rewind, context progress bar and TPS gauge — zero core changes.
The plugin market for DeepSeek Harness: browse/search/one-click install community plugins and themes, with updates, backup/restore, hot disable, diagnostics, and AI fix.
A persistent whale widget on the DSH web UI that shows DeepSeek balance, today's usage, and per-turn cost, with drag-and-snap and sound effects.