AI Agent Hub
Back to plugins
🧰

dsh-deepseek-usage

Web Tools Updated 2026.08.25

Run the following command in DeepSeek Harness:

dsh plugin install kane-le/dsh-deepseek-usage

Paste the following prompt into your AI chat to install this plugin:

Run dsh plugin install kane-le/dsh-deepseek-usage inside DeepSeek Harness to install the plugin; the full source is available at https://github.com/kane-le/dsh-deepseek-usage . After installation, restart dsh web to activate it.

About this plugin

DeepSeek's official API does not expose a usage-query endpoint, so tracking exactly how many tokens you have consumed usually means digging through raw logs by hand. dsh-deepseek-usage closes that gap: it aggregates local DSH session logs—zstd-compressed history included—into a cumulative token-usage tally, then calls the official balance API in real time. A single /usage command surfaces both what has been spent and what remains, in one clean report.

The usage ledger is keyed by session:turn:step, so live events and log rescans share the same key space without double-counting. After the first full scan of each log file, subsequent calls read only new content, keeping lookups fast. The balance query covers account status plus total, top-up, and gifted balances per currency. Keys are resolved automatically through the credentials service, the DEEPSEEK_API_KEY environment variable, or the local credentials file, and the endpoint can be overridden via DEEPSEEK_BASE_URL. zstd multi-frame logs are decoded with node:zlib—no external tools needed.

Built for developers and small teams who run DeepSeek API workloads through the DSH Web interface and want a quick, at-a-glance view of spend and remaining balance—no window-switching to a cloud console, no ad-hoc scripts. Type /usage and get a report.

Use Cases

  • Type /usage in the DSH Web chat to see cumulative token spend and live account balance at a glance
  • Need just the balance? Run /usage balance to confirm account status and per-currency remaining credits
  • After new sessions arrive, run /usage rescan to force a full re-scan of all log files for an up-to-date report

Best For

  • Independent developers calling the DeepSeek API through the DSH Web interface
  • Small teams that need a quick check on token spend and balance without switching to a cloud console
  • Tech leads who want script-free, dependency-free API usage tracking