Back to directory

dsh-usage-plugin

Curated pickMaintenance: Active

feiyang-dev/dsh-usage-plugin

DSH 用量与成本追踪:每次调用的 token/缓存命中统计、峰谷计费、余额查询、日历热力图、CSV/JSON/PNG 导出,Host+Client 双半一体化包

View on GitHub
$ dsh plugin --profile web add @feiyang666/dsh-usage-plugin

37

stars

5

forks

JavaScript

Language

MIT

License

2026-08-14

Created

2026-09-24

Last push

A community DSH plugin (MIT) that turns DeepSeek Harness into a usage & cost tracker: per-call token/cache records, peak/off-peak pricing, balance query, calendar heatmap, and multi-format export.

DSH integration

Native runtime

Author-claimed

Safety audit

Unaudited

Last verified

2026-09-05

License

MIT

01What can it help you accomplish?

  • Track token usage and cost of every DeepSeek Harness model call

    Usage & Cost and Balance Query tabs in the Web UI — per-call token/cache records, peak/off-peak cost, calendar heatmap, CSV / JSON / PNG export

    DeepSeek Harness users who want to monitor spend and reconcile usage with the official console

  • Query DeepSeek balance and export usage reports

    Balance Query tab backed by DEEPSEEK_API_KEY; CSV / JSON / PNG long-image export of up to 2000 records to any directory

    Individuals and teams who need monthly cost reconciliation and shareable usage reports

02How to install into DeepSeek Harness

Prerequisites

  • DeepSeek Harness installed (`npm install -g @deepseek-ai/dsh`, a desktop app, or `npx @deepseek-ai/dsh web`)
  • pnpm for the recommended method A: `npm install -g pnpm` (or `corepack enable`)
  • DEEPSEEK_API_KEY set in Settings → Models to enable Balance Query

Installation steps

  1. 01

    Desktop app (recommended): Install Plugins → Recommended → Usage & Cost Tracker → Install, then click Restart Service Now

  2. 02

    CLI: `dsh plugin --profile web add @feiyang666/dsh-usage-plugin`

    $ dsh plugin --profile web add @feiyang666/dsh-usage-plugin

  3. 03

    Restart the dsh web service (`dsh web` / fully quit and reopen the desktop app)

    $ dsh web

Verify the integration

  • Refresh http://127.0.0.1:3080 — after Conversation and Trace you should see the Usage & Cost and Balance Query tabs
  • Send a message; the Usage & Cost panel should show this call's token / cost record

Rollback

  • Uninstall: `dsh plugin --profile web remove @feiyang666/dsh-usage-plugin`, then restart the app

03DSH integration and capability boundaries

DSH integrationNative runtime

Native DSH plugin via `dsh.bundle.patch` + `dsh.client` declarations — one-command install (`dsh plugin --profile web add @feiyang666/dsh-usage-plugin`) wires the host + client halves

  • Usage & Cost tracking

    each model call from DeepSeek Harness→per-call token + cache-hit records, peak/off-peak cost via DeepSeek pricing, by-model and by-provider tables, date filtering

  • Balance Query

    configured DEEPSEEK_API_KEY→DeepSeek account balance

  • Usage Calendar heatmap

    recorded calls→monthly daily-usage heatmap colored by cost/call count with peak/off-peak split and per-day stats

  • CSV / JSON / PNG export & import

    usage records (up to 2000)→CSV / JSON / PNG long-image export to any folder (auto-opens), plus JSON/CSV merge-import

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

Good for

  • DeepSeek Harness users who want to monitor spend and reconcile usage with the official console
  • Individuals and teams who need monthly cost reconciliation and shareable usage reports

Not for

  • Balance Query requires DEEPSEEK_API_KEY configured in Settings → Models; without it the query fails with "DEEPSEEK_API_KEY not configured".

05Compatibility, maintenance and safety notes

  • Balance Query requires DEEPSEEK_API_KEY configured in Settings → Models; without it the query fails with "DEEPSEEK_API_KEY not configured".
  • Supports Windows / macOS / Linux: paths are handled per platform and the folder picker uses each OS's native mechanism; balance query and export do not depend on Windows-only commands.
  • Since v1.9.2 records live in a fixed dedicated data directory (writes bypass the model sandbox); do not hand-edit files under node_modules — updates overwrite them.
2026-08-142026-08-29v1.16.5

MIT · community plugin for DeepSeek Harness, actively maintained (latest release v1.16.5, 2026-08-29)

06Frequently asked questions

How do I install dsh-usage-plugin?

Recommended: in DeepSeek Harness Desktop go to Install Plugins → Recommended → Usage & Cost Tracker → Install, then Restart Service Now. Or CLI: `dsh plugin --profile web add @feiyang666/dsh-usage-plugin`, then restart `dsh web`.

Does Balance Query need an API key?

Yes — set DEEPSEEK_API_KEY in Settings → Models (the same key used for chats). Without it the query fails with "DEEPSEEK_API_KEY not configured".

Where are my usage records stored?

Since v1.9.2 they live in a fixed dedicated data directory (overridable via DSH_USAGE_DATA_DIR), not in the workspace, so history survives workspace switches and updates.

How do I remove the plugin?

Run `dsh plugin --profile web remove @feiyang666/dsh-usage-plugin` and restart; `dsh plugin` also auto-removes the bundle entry from the profile.

08Data and sources

  • Author-claimedgithub.combf612da3982d…

    dsh-usage-plugin is a **usage & cost tracker** plugin in the DeepSeek Harness ecosystem (a DSH plugin shipped as a Host…

  • Author-claimedgithub.combf612da3982d…

    **installation is one command** — no YAML editing, no manual file copying.

This page is generated from the project’s public documentation, repository metadata and a structured parse of DSH Plugins; last verified on 2026-09-05. 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.