Introduction¶
After running multi-turn conversations, switching models, or opening multiple sessions in DeepSeek Harness (DSH), usage data is often scattered across session snapshots and provider reports. It is difficult to see at a glance “how much was used today, which model accounts for the bulk, or exactly how many tokens a specific request consumed.” Writing your own scripts to scan directories is prone to missing fields and aligns poorly with Harness’s session query interfaces.
@asun-labs/dsh-plugin-token-dashboard is a client-side bundle plugin maintained by asun-labs: it reads the host’s validated real-time and persisted session corpora, and writes a single-file, openable-offline HTML dashboard in the current workspace, without relying on external scripts or telemetry. The following section describes its capabilities, boundaries, installation, and typical usage.
What is this¶
- Positioning: A DeepSeek Harness plugin that generates a self-contained token usage dashboard (
token-dashboard.html) via the tooltoken_dashboard. - Maintainer: asun-labs (GitHub: asun-labs/dsh-plugin-token-dashboard).
- npm package name:
@asun-labs/dsh-plugin-token-dashboard(version0.1.0in the reference material). - Problem solved: Aggregates counts reported by the provider (input / output / cache-read / cache-write, etc.) into an interactive local page, supporting drill-down by workspace, session, and request.
The product concept is inspired by fuyi-git/token-dashboard; this repository is an independent TypeScript implementation under the MIT license and does not copy its Python or HTML source code.
Core Features¶
The following capabilities are drawn from the project README; please verify against GitHub before installation:
- Metrication standards: Uses input, output, cache-read, and cache-write token statistics reported by the provider.
- Views: Daily usage, 24-hour activity, model distribution, KPIs; supports switching between 1 / 7 / 30-day and all-history windows.
- Drill-down: Workspace → session → single request.
- Themes: Light / Dark, stored only locally in the browser.
- Deliverable: A single local HTML file with no external scripts, fonts, network requests, or telemetry.
- Fork scenarios: Statistics exclude inherited event prefixes to avoid double-counting forked sessions.
Data reading is performed via the public sessionQuery service; it does not scan storage internals, upload logs, or initiate additional network requests. The generated HTML still contains usage metadata, workspace paths, session titles, and model names, so review it yourself before sharing.
Environment and Dependencies¶
- Node.js:
^22.19.0or>=24.0.0. - DeepSeek Harness: 0.1.7 prerelease line (as required by the README).
Installation and Enablement¶
The plugin is installed as an npm package into a specified Harness profile. The example in the reference material uses the profile name token-dashboard with PowerShell syntax; if you use bash, adjust the pipe syntax according to your local DSH documentation, but the add subcommand and package name should remain consistent.
If the profile does not yet exist, initialize it first:
dsh --profile token-dashboard --from-default-profile web --dump-config | Out-Null
Install the plugin and start (add --no-open if you do not want the browser to open automatically):
dsh plugin --profile token-dashboard add @asun-labs/dsh-plugin-token-dashboard
dsh --profile token-dashboard --dump-config
dsh --profile token-dashboard --no-open
After installation, you can use dsh --profile token-dashboard --dump-config to confirm whether the bundle is loaded.
Typical Usage¶
In the Web UI, simply ask the agent to call the plugin tool to generate the dashboard. The prompt example given in the README is:
Use the token_dashboard tool to generate my token usage dashboard.
The tool writes token-dashboard.html to the workspace of the current session and returns the absolute path of the file. Open it in a browser to view it offline.
Configuration¶
You can set these in a Cordis patch or the plugin config (refer to the README for field specifications):
config:
fileName: token-dashboard.html
readConcurrency: 4
fileName: Must be a pure.htmlfilename; the plugin will not write outside the active workspace.readConcurrency: An integer ranging from 1–32, controlling the concurrency when reading session snapshots.
For developers performing local checkout verification or overlay iteration in the Harness source tree, the README also provides examples for corepack pnpm and local.cordis.patch.yml; daily users can primarily rely on npm installation plus the Web UI tool invocation.
Scenarios and Notes¶
Who it is for
- Developers already using the DSH 0.1.7 prerelease line who wish to review token usage via a local HTML file.
- Scenarios requiring investigation of model costs and cache read/write proportions by workspace / session / request.
Please confirm before use
- The plugin runs under the permissions of the current dsh process, and the range of sessions it can read is consistent with the host; it is recommended to read the GitHub repository source code and MIT license before installation.
- The community directory page skillhub.cn plugin entry and GitHub are independent information sources; the directory site has no official affiliation with DeepSeek / High-Flyer. Versions and stars should be based on npm / GitHub at the time of your installation (the GitHub star count was 0 when the data was scraped).
- The generated artifact contains sensitive metadata such as paths and session titles; do not send the HTML directly to untrusted environments.
Summary¶
Through the steps above, without touching external services, you can pull provider-level token accounting from the sessions persisted by Harness and obtain an offline dashboard in your workspace that supports drill-down and time-window switching. For further details and issues, see GitHub; for the plugin index, see the SkillHub directory page.