stevenx65/dsh-balance-plugin
dsh-balance-plugin shows DeepSeek API balance and token usage at the bottom of the DSH web sidebar (port 3080): it calls DeepSeek's official GET /user/balance reusing dsh's credentials (~/.dsh/.credentials.yaml — no manual key entry), reads dsh session logs (session.jsonl.zstd) to aggregate token usage by provider (uncached input / cache read / output / model call count), and offers a Today / All-time toggle (today uses Beijing time). The balance button sits in sidebar.footer.action with a floating panel; data is served by a node-side route /dsh-balance/data?scope=today|all.
Install
dsh plugin --profile web add dsh-balance-pluginnpm package dsh-balance-plugin 0.2.0 (registry-verified 2026-08-24). Install from the plugin market: dsh plugin --profile web add dsh-balance-plugin. Restart dsh web, then refresh the page — a balance button appears at the bottom of the sidebar. Manual install alternative (copy files into ~/.dsh/profiles/web/node_modules/dsh-balance-plugin + insert into cordis.patch.yml) is documented for offline setups.
Compatibility
DeepSeek Harness web profile (port 3080). Node side uses only Node built-ins (node:fs, node:child_process, node:path) and requires the zstd CLI for decompressing session logs; browser side depends on @deepseek-ai/dsh-client-ui-primitives (peer dep, ships with dsh 0.1.0-rc.6). Filters to the deepseek-official provider only, ignoring other vendors. Auto-adapts to light/dark theme. MIT.
Details
- Repo: stevenx65/dsh-balance-plugin
- Category: Other
- Stars: 7
- Version: npm package dsh-balance-plugin 0.2.0 (registry-verified 2026-08-24)
- Last push: 2026-08-14
- First seen: 2026-08-14
Recent updates
The current English README documents: features (balance via official API reusing dsh credentials, token usage from session logs, Today/All-time toggle, light/dark adaptation), install (plugin market + manual), architecture (client.js ↔ /dsh-balance/data ↔ index.js), dependencies, data source format, and packaging (npm pack).
FAQ
- Do I need to enter an API key manually?
- No — the plugin calls DeepSeek's official GET /user/balance reusing dsh's credentials from ~/.dsh/.credentials.yaml.
- Which providers are counted?
- Only deepseek-official — other vendors are ignored. Usage is aggregated from dsh session logs (session.jsonl.zstd) by provider.
- What does the Today/All-time toggle do?
- Today shows usage for today (Beijing time), All-time shows the full history from the session logs.
Alternatives
zoumutou/dsh-cost-balance · 940842546/dsh-usage-billing · YZz-S/dsh-billing-balance