pangzi499/dsh-balance-stats

Balance, session cost, token usage, and invoice summaries for DeepSeek Harness Web.

Balance and usage statistics bar below the conversation composer: Balance ¥40.22 | This session ¥0.15 | Total spent 42.5% — click the bar for an interactive details card with balance composition (available/topped-up/granted), Harness local usage estimates, model-level spend, token usage, and historical billing summaries (today, 7/30 days). Optional auto invoice import: paste the platform userToken once and the server re-fetches invoices on a schedule (persisted to the local credentials file mode 0600, clears with one click); JSON get_all_invoice paste works as a token-less fallback. Stale-while-error caching keeps the last successful balance/invoice during failures.

Agent Capabilities ★ 3 updated 2026-09-18 ✅ runtime-tested
View on GitHub ↗

Install

npx @deepseek-ai/dsh plugin --profile web add https://github.com/pangzi499/dsh-balance-stats.git

Git URL install per README (English edition): npx @deepseek-ai/dsh plugin --profile web add https://github.com/pangzi499/dsh-balance-stats.git, then start/restart with npx @deepseek-ai/dsh web and hard-refresh. Update: npx @deepseek-ai/dsh plugin --profile web update dsh-balance-stats. Requires Node.js >=22.19.0 and pnpm on PATH. No npm package.

Compatibility

DeepSeek Harness web profile. Reads the official DeepSeek balance API; uses composer-scoped balanceStatsSessionCost projection for live session cost.

Details

Recent updates

stats bar + details card; balance composition; per-model spend; invoice import (token + JSON); stale-while-error caching.

FAQ

Where does the balance come from?
The official DeepSeek balance API, showing available, topped-up, and granted balances; the session figure is a live projection from the composer-scoped estimate.
How does invoice import work?
Paste your platform userToken once (stored locally, mode 0600) for scheduled re-fetches, or paste a get_all_invoice JSON response for a one-shot import — both force-refresh every figure.
What happens when the API fails?
Stale-while-error: the last successful balance/invoice is retained and shown until the next refresh succeeds.

Alternatives

LemCAE/dsh-balance · crazywoola/dsh-balance · jelly-000/dsh-balance-monitor

More plugins in Agent Capabilities

Browse more in Agent Capabilities

Guides for Agent Capabilities plugins