Back to directory

dsh-usage-stats

Curated pickMaintenance: Active

ychris12138/dsh-usage-stats

Provider balances, subscription quotas, and token-usage analytics for the DeepSeek Harness Web GUI (dsh web).

View on GitHub
$ dsh plugin --profile web add "github:Ychris12138/dsh-usage-stats"

146

stars

16

forks

JavaScript

Language

MIT

License

2026-08-14

Created

2026-09-02

Last push

MIT-licensed native dsh web plugin that monitors multi-provider balances, subscription quotas and token usage inside DeepSeek Harness — unified account cards, a monthly heatmap, and declarative JSON Pointer adapters, with credentials kept server-side.

DSH integration

Native runtime

Author-claimed

Safety audit

Unaudited

Last verified

2026-08-25

License

MIT

01What can it help you accomplish?

  • Monitor multi-provider account balances, subscription quotas, and token usage from inside the DeepSeek Harness Web GUI

    Unified account cards (API balance or per-window Token Plan quota) plus token-usage analytics in the dsh web sidebar

    DeepSeek Harness (dsh web) operators running paid API providers who need to watch spend without leaving the GUI

  • Break down DeepSeek Harness token usage by date, provider, and model

    Today / month-to-date / cumulative totals, cache-hit rate, a monthly heatmap, and drill-downs by date/provider/model

    Power users and teams tracking token spend across providers and models

02How to install into DeepSeek Harness

Prerequisites

  • DeepSeek Harness `web` profile — the README requires `@deepseek-ai/dsh >= 0.1.0-rc.6`
  • Provider credentials configured in `~/.dsh/.credentials.yaml` (the installer never reads or writes that file)

Installation steps

  1. 01

    $ dsh plugin --profile web add "github:Ychris12138/dsh-usage-stats"

  2. 02

    Restart the already-running `dsh web` and hard-refresh the browser

    $ dsh web

  3. 03

    $ npx --yes github:Ychris12138/dsh-usage-stats

Verify the integration

  • After restart + hard refresh, a 'Usage/Balance' (用量/余额) entry appears at the bottom of the sidebar

Rollback

  • dsh plugin --profile web remove "@ychris12138/dsh-usage-stats"

03DSH integration and capability boundaries

DSH integrationNative runtime

Native dsh web plugin: added via `dsh plugin --profile web add`, it mounts a Usage/Balance panel in the DeepSeek Harness Web GUI sidebar and exposes five loopback-only API endpoints.

  • Unified account cards

    configured provider credentials (API key, management key, or auth.json) resolved by the Harness from `~/.dsh/.credentials.yaml`per-provider balance snapshot or per-window Token Plan quota card — one provider shown at a time

  • Token usage analytics

    provider-reported `usage` from `assistant/chunk` or `assistant/message` eventstoday / month-to-date / cumulative totals, cache-hit rate, monthly heatmap, drill-down by date/provider/model

  • Background monitoring

    server start plus all configured accountsrefreshed account balances and local token aggregation

    refreshes all configured accounts and local token aggregation every five minutes after the server starts
  • Pluggable / declarative adapters

    New API, Sub2API, generic balance template, or declarative JSON Pointer queriesnormalized account/quota from supported upstream endpoints

04Who is it for? When not to use it?

Good for

  • DeepSeek Harness (dsh web) operators running paid API providers who need to watch spend without leaving the GUI
  • Power users and teams tracking token spend across providers and models

Not for

  • All five API endpoints accept loopback GET only and validate peer socket + Host; credentials are resolved server-side and sent only to validated provider addresses — never to the browser.
  • OpenRouter account balance requires a separate OPENROUTER_MANAGEMENT_KEY; the plugin will not probe the regular inference OPENROUTER_API_KEY, and shows 'unconfigured' when the management key is absent.

05Compatibility, maintenance and safety notes

  • All five API endpoints accept loopback GET only and validate peer socket + Host; credentials are resolved server-side and sent only to validated provider addresses — never to the browser.
  • OpenRouter account balance requires a separate OPENROUTER_MANAGEMENT_KEY; the plugin will not probe the regular inference OPENROUTER_API_KEY, and shows 'unconfigured' when the management key is absent.
  • DSH Community Market GUI install needs the scoped npm package `@ychris12138/dsh-usage-stats` published; pre-publish catalog entries are browsable but install stays disabled (fail-closed).
2026-08-142026-08-24v0.2.10

MIT · actively maintained (latest release v0.2.10, 2026-08-22)

06Frequently asked questions

How do I install dsh-usage-stats into DeepSeek Harness?

Run `dsh plugin --profile web add "github:Ychris12138/dsh-usage-stats"`, then restart `dsh web` and hard-refresh the browser. The sidebar gains a 'Usage/Balance' entry. If `dsh plugin` is unavailable, `npx --yes github:Ychris12138/dsh-usage-stats` is an equivalent installer.

Which providers and account types does it support?

It auto-discovers the official DeepSeek route and provider profiles, and supports DeepSeek, OpenRouter, Moonshot/Kimi, OpenCode Go, Z.ai, Kimi For Coding, MiniMax, Ollama Cloud, New API, Sub2API and declarative JSON Pointer monitors. Providers without a public balance API still count tokens; their card shows 'unsupported' instead of guessing.

Are my API keys or cookies ever exposed to the browser?

No. API keys, cookies, management PATs and upstream responses never reach the browser, plugin cache or logs. The five endpoints accept loopback GET only and validate peer socket + Host; credentials are resolved server-side and sent only to validated provider addresses.

Does OpenRouter need a different key than normal inference?

Yes. OpenRouter balance uses a separate OPENROUTER_MANAGEMENT_KEY, not the regular OPENROUTER_API_KEY. If the management key is missing the card shows 'unconfigured' and the plugin will not probe with the inference key.

Can I install it from the DSH Community Market GUI?

The repo ships a Path A standard-source catalog, but the Market GUI 'install' button only works after the scoped npm package `@ychris12138/dsh-usage-stats` is published; before that the catalog entry is browsable but install stays disabled (fail-closed).

08Data and sources

  • Author-claimedgithub.com612d7a80581e…

    Provider balances, subscription quotas, and token-usage analytics for the DeepSeek Harness Web GUI (`dsh web`).

  • Author-claimedgithub.com612d7a80581e…

    需要 DeepSeek Harness `web` profile(`@deepseek-ai/dsh >= 0.1.0-rc.6`)。

This page is generated from the project’s public documentation, repository metadata and a structured parse of DSH Plugins; last verified on 2026-08-25. Found an error? Submit a correction.

🏆

Best DeepSeek Harness Plugins

Twelve plugins worth installing first — picked from the whole catalog, across every category.

DSH Plugins is an independent community directory of DeepSeek Harness plugins. Not affiliated with or endorsed by DeepSeek. Third-party plugins are not security-audited — review the source before installing.

New DeepSeek Harness plugins, weekly. No spam.