dsh-usage-stats
Run the following command in DeepSeek Harness:
dsh plugin install lengduan/dsh-usage-stats
Paste the following prompt into your AI chat to install this plugin:
Install dsh-usage-stats: source at https://github.com/lengduan/dsh-usage-stats — run dsh plugin install lengduan/dsh-usage-stats inside a DeepSeek Harness Web profile, then restart dsh web; a Usage tab appears at the top of the session view.
About this plugin
DSH has no built-in cross-session usage view: the moment you delete a conversation, its token spend vanishes. dsh-usage-stats writes every model call's input, output, cached-hit, and cached-write tokens into a standalone local SQLite ledger. Deleting sessions or clearing their logs leaves the already-recorded numbers intact, turning ephemeral call data into a persistent, auditable record.
The core design is bucketing and separation. Records are grouped by day, provider, and model, with filters for today, this week, a specific date, or the full history. Two scopes let you isolate primary chat calls from DSH internal calls (compression, summarisation, title generation). Three ingestion paths—session/event for chat, llm/stream for internal work, and an incremental backfill of pre-install history—share a composite primary key with INSERT OR IGNORE, so no call is double-counted. The API is loopback-only, there are no outbound requests, no configuration knobs, and no secrets; everything lives in one or two files under $DSH_HOME.
It is for anyone who wants to verify token consumption per day or per model and needs a clean split between user-facing conversations and DSH's own background work. It is not for cost calculation (raw tokens only, no unit-price multiplication), multi-machine roll-ups, or TUI / headless environments.
Use Cases
- Check daily token usage across providers and models in one table
- Separate primary chat calls from DSH internal calls (compression, summarisation, title generation) in the usage view
- Recall historical token records from the local ledger even after sessions are deleted
Best For
- DSH users who need to verify token consumption by day or model
- Developers who want to track chat vs. internal DSH calls separately
- DSH Web GUI users who care about persistent, outlive-the-session usage records
Related Plugins
Memory layer for coding agents that indexes local session history and auto-recalls relevant context before edits, commands, and failures, with no manual search needed.
Traceable, searchable cross-session memory for AI agents that turns conversation knowledge into a typed knowledge graph and recalls relevant subgraphs instead of replaying full history, natively integrated with DeepSeek Harness.
Gives DSH AI cross-session long-term memory, to-do and skill management, plus multi-session orchestration, external AI delegation, and an infinite canvas that grows with you.
dsh-mnemon is a three-tier, pluggable, Agent-driven memory system for DeepSeek Harness, combining Runtime memory, Project Documents, and replaceable Memory Spaces with nine long-term providers.