Preface¶
When running multiple models and multiple sessions in DeepSeek Harness (DSH), token consumption is scattered across session logs. If the built-in capabilities only provide a single-request or single-session view, it is difficult to answer questions like “how much has each model used in the past month,” “which day had the most intensive usage,” or “how many consecutive days it has been used.” The community plugin dsh-usage-dashboard (maintainer: bzhao0110, category: client) provides a zcode-style usage panel in Harness Settings → Token Statistics: metric cards, activity heatmaps, per-model daily trends and proportions. It does not estimate costs—it only counts tokens.
What This Is¶
dsh-usage-dashboard is a client-side plugin for DSH that tracks Token usage statistics. The server registers a session projection named tokenStats; the client injects its UI via the settings.section slot on the settings page, aggregates projectionValues.tokenStats from all sessions, and then renders the panel. The charts have zero runtime dependencies and are entirely hand-written SVG.
Core Features¶
The following documents the capabilities available in the panel (all are subject to the README).
Metric Cards (5)¶
- Cumulative Tokens
- Peak Single-Day Total
- Longest Session Duration
- Current Consecutive Usage Days
- Longest Consecutive Usage Days
Token Activity Heatmap¶
53 weeks, GitHub-style layout; switchable between “Daily” and “Cumulative” views.
Daily Token Trends¶
Line charts covering the last 7 or 30 days, with per-model series.
Model Usage Donut Chart¶
Displays the proportion of each model along with a detailed list.
Statistical Principles and Metrics¶
Event folding is performed first, followed by accumulation by day and by model:
- The server registers the
tokenStatsprojection viactx.sessionProjections.register. - Events such as
request/header,step/start,assistant usage,step/end,compaction/summaryare folded, accumulating tokens by day × model. - Harness replays persisted logs when a session is first touched, so historical sessions are also counted.
Metric notes (consistent with the built-in tokenUsage projection; the README states that verification has been done by reconciling 19 real sessions one by one):
- Total tokens = input + cacheRead + cacheWrite + output
- Multiple usage reports for the same (turn, step) only count the latest one (streaming chunk replacement semantics)
- No cost estimation
Note: Projections are folded on demand; only sessions that have been opened have data. To backfill all historical data at once, see “Historical Data Backfill” below.
Installation and Activation¶
The plugin runs with the permissions of the current DSH process; before installing, it is recommended to read the source code and MIT license in the GitHub repository. The DSH ecosystem emphasizes “everything is a plugin”; the SkillHub directory page is a community site and has no official affiliation with DeepSeek / High-Flyer.
npm (Recommended)¶
dsh plugin --profile web add dsh-usage-dashboard
In the desktop version, go to Settings → Plugins → Add plugin and enter the npm package name dsh-usage-dashboard.
From Source / Local Development¶
For the web / tui profile:
dsh plugin --profile web add /path/to/dsh-usage-dashboard
The desktop profile currently has no plugin page installation entry; you need to manually modify ~/.dsh/profiles/desktop/package.json: add "dsh-usage-dashboard": "file:/path/to/dsh-usage-dashboard" under dependencies, and add "dsh-usage-dashboard" under dsh.profile.bundles, then install and restart the application:
cd ~/.dsh/profiles/desktop && npx pnpm@11.9.0 install
After completion, restart the DeepSeek Harness application.
From GitHub¶
dsh plugin add github:bzhao0110/dsh-usage-dashboard
The README explains: git installation installs the source code, and you may need to authorize the build scripts in the profile’s pnpm-workspace; npm installation is the recommended approach.
Typical Usage¶
View the Panel¶
After installation and restarting Harness, open Settings → Token Statistics to view the metric cards, heatmap, trends, and donut chart.
Historical Data Backfill¶
If you need all historical sessions to be included in the statistics, run in the plugin repository directory:
node tools/backfill.mjs --dry # Preview
node tools/backfill.mjs # Write to projcache (automatically skips active sessions)
After backfilling, restart Harness, and the settings panel will display all historical statistics.
Suitable Scenarios and Notes¶
Who it’s for: Developers who use multiple models and multiple sessions in DSH over the long term and need an overview of token usage, activity rhythm, and model proportions.
Compatibility (from README): The peer dependency accepts all versions of the 0.1 line and 0.2 line starting from DSH 0.1.0-rc.6 (including rc); 0.3.0 and later are untested. The current npm package version is 0.1.0.
Client platform: In package.json, dsh.client.platform is web, and it injects @deepseek-ai/dsh-client-ui-settings.
Conclusion¶
dsh-usage-dashboard aggregates token events scattered across session logs into a day × model projection, then presents them in a settings page panel using SVG. It is suitable for scenarios that require usage overview rather than bill estimation. For more information, see the SkillHub directory and GitHub: bzhao0110/dsh-usage-dashboard.