AI Agent Hub
Back to plugins
🖥️

dsh-token-stat

Client Updated 2026.08.27

Run the following command in DeepSeek Harness:

dsh plugin install Anna-la/dsh-token-stat

Paste the following prompt into your AI chat to install this plugin:

In DeepSeek Harness, paste the repository URL https://github.com/Anna-la/dsh-token-stat into the plugin installer area. No build step is required; restart the desktop app after installation to begin tracking.

About this plugin

After weeks of daily DSH conversations the token bill keeps growing, yet figuring out which model burns the most, whether a particular week spiked, or how much cache hits actually saved you still means digging through dozens of session logs. dsh-token-stat collapses all of that into a single expandable card on the settings page, so you get a clear report in one click instead of manual grep.

It does exactly one job: it reads the provider-reported usage fields from session logs, de-duplicates repeated samples within the same turn and step, then breaks the totals down by model and by day for the last 14 days. The card shows cumulative input, cache-read, cache-write, output and grand totals with percentages, plus a per-model request table. A visualization button pops up three hand-written SVG charts with zero third-party dependencies and hover tooltips for exact numbers. Scanning reads directly from the on-disk /sessions directory, so closed or even deleted projects whose logs are still present are included, and every session is recorded in an archive ledger so that a session s last known usage survives even after its file is completely removed, with no double-counting.

The plugin has zero runtime dependencies, requires no build step and no allowBuilds grant, and never modifies any session data. Its data defaults to ~/.dsh-token-stat, which lives entirely outside DSH_HOME, so official cleanup of profiles, storages, or sessions will never touch your reports. It is built for heavy daily DSH users, small teams that need per-project token cost accounting, and developers tuning prompts for better cache-hit ratios. Once installed, you stop guessing from raw logs.

Use Cases

  • Review which model consumed the most tokens at month-end
  • Compare token usage trends over the last two weeks
  • Check how cache hits affect total token spend

Best For

  • Indie developers who use DSH heavily every day
  • Small teams that need per-project token cost accounting
  • Prompt engineers looking to optimize cache strategy and reduce spend