AI Agent Hub
Back to plugins
🖥️

dsh-plugin-token-usage

Client Updated 2026.08.20

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