dsh-plugin-token-usage
Run the following command in DeepSeek Harness:
dsh plugin install lovedheart/dsh-plugin-token-usage
Paste the following prompt into your AI chat to install this plugin:
Run dsh plugin install lovedheart/dsh-plugin-token-usage in your DeepSeek Harness (DSH) terminal to install the plugin. Source: https://github.com/lovedheart/dsh-plugin-token-usage
About this plugin
After dozens of DSH sessions and calls to multiple models, figuring out where tokens actually went and which provider consumed the most means wading through raw logs. dsh-plugin-token-usage aggregates the provider-reported usage scattered across session logs into a single /usage command so you get a full picture at a glance.
The plugin reads persisted logs under ~/.dsh/sessions (including subagent sessions) and buckets usage by date, provider, and model. An incremental backfill with per-file watermarks keeps scans idempotent across restarts and crash-recovery re-encodes, eliminates double counting, and removes the need for write-time bookkeeping. It ships with zero runtime dependencies, relying only on the Cordis ctx API and the built-in zstd frame scanner in Node 22.
If you use DSH heavily, need to track API costs or run periodic usage reviews, and would rather avoid a heavy observability stack like Prometheus, this plugin offers a lightweight, plug-and-play solution.
Use Cases
- Periodic review of token consumption across providers and models
- Track API costs and identify high-consumption models
- Compare usage trends across dates to optimize calling strategies
Best For
- Heavy DSH users working with multiple models
- Developers who need to track API costs
- Users preferring lightweight solutions over heavy observability stacks
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.