Introduction¶
DeepSeek Harness (dsh) writes logs for each session. Reading these logs is the only way to answer “How much did this machine actually spend, and on what”—the harness’s own projection only covers the host it is running on. This plugin merges two previous plugins at the data layer, so a single index drives a single dashboard, and the numbers are consistent everywhere.
Core Features¶
This plugin provides machine-level token accounting:
- Per dsh home directory: Scans
~/.dsh,~/.dsh_desktop/<version>, and$DSH_HOME. Reads legacysession.jsonl[.zstd]and versioned logs. - One range control: Today / 7 days / 14 days / 30 days / all time / custom. This range controls the title card, trend, model panel, session ranking, calls table, and costs.
- One model panel: Each row shows share, a stacked input / cache read / cache write / output bar, call count, and cost (if priced).
- Session ranking: Sorted by token count; click a row to filter the calls table.
- Smooth multi-series trend: Total / input / output / cache read, with a toggleable legend and hover readout.
- Call details: time, response time, input, output, cache rate, model, thinking effort. Includes filters (model/provider/threshold) and pagination.
- Export: CSV / JSON for the current window.
- UI features: collapsible panels, Chinese/English support, light/dark theme. Open panels auto-refresh every 60 seconds.
- Optional cost estimation: local pricing table with peak/off-peak weighting.
Install and Enable¶
Install using the official command:
dsh plugin --profile web add github:satan9394/dsh-usage-unified
After installation, restart the Web profile. The dashboard appears in the “Usage Stats” section of the sidebar footer, or as a section under settings.
Note: The plugin is blocked in the marketplace (requires file system/network access), but manual installation is supported.
Typical Usage¶
- Open the sidebar footer entry (or Settings -> Usage Stats).
- Select a date range (today / 7 days / 14 days / 30 days / all time / custom) to filter data.
- Click a session ranking row to filter the calls table.
- Use filters (model/provider/threshold) in the call details table.
- Access data via the loopback API endpoints:
/usage-unified/v1/snapshot,/calls,/export.csv,/export.
Use Cases and Notes¶
- Version requirement: Requires DeepSeek Harness (dsh) 0.1.5-rc.1 or later.
- Runtime: Requires Node.js ^22.19.0 || >=24.0.0.
- Privacy: Runs entirely locally; no network calls from the browser.
- Installation: The plugin is blocked in the marketplace due to file system access requirements, but manual installation is supported.
Brief Conclusion¶
This tool provides DSH with a unified view for cost analysis and usage pattern tracking across different session logs. For more details, see GitHub.