dsh-token-usage
Run the following command in DeepSeek Harness:
dsh plugin install l956615272-hub/dsh-token-usage
Paste the following prompt into your AI chat to install this plugin:
Run dsh plugin install l956615272-hub/dsh-token-usage in the DeepSeek Harness terminal to install; source repository at https://github.com/l956615272-hub/dsh-token-usage
About this plugin
Once your DSH desktop accumulates dozens of sessions across multiple workspaces or even a migrated DSH home directory, the simplest question becomes the hardest to answer: how many tokens have I actually consumed in total? dsh-token-usage is built for that single question. It scans every local session log, aggregates non-cached input, output, cache reads, and call counts into one summary, then lets you slice by day, model, provider, project, or session, with support for custom date ranges.
Under the hood it handles the details that silently inflate raw counts: multi-frame zstd logs are fully decompressed frame by frame, duplicate message ids shared by v0/v3 and resume/fork copies are deduplicated globally (otherwise results are roughly three times too high), and streaming chunk reports are filtered out in favor of the final assistant message only. A full scan of 61.6 MB across 99 session files completes in about 1.4 seconds, with results cached to disk and the dashboard auto-refreshing every 30 seconds. The Host uses only built-in Node modules with zero third-party runtime dependencies.
For teams juggling multiple subscriptions or API gateways, the per-provider quota panel lets you set an amount, unit, monthly refresh day, and enabled toggle for each provider, showing used-versus-remaining with progress bars and red flags when over budget. All configuration is stored locally in quota.json; nothing is uploaded and no session log is ever modified.
It is built for heavy DSH users, teams mixing several LLM providers, and anyone who wants a single glance to answer how much budget remains this cycle. No fee calculators, no heatmaps, no pet animations - just fast, accurate, global token accounting.
Use Cases
- Aggregate total token consumption across all local DSH sessions with call counts
- Break down usage by day, model, provider, or project with custom date ranges
- Configure per-provider monthly quotas and refresh dates to track remaining budget
Best For
- Heavy DSH users running large numbers of concurrent sessions
- Teams mixing multiple LLM providers or API gateways
- Developers who need regular token budget and quota accounting
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.