LemCAE/dsh-balance

DeepSeek account balance and current-session spend estimate in a top-bar chip and settings card, with pause-aware auto-refresh, an editable official price table, a deepseek_balance model tool, and a bilingual UI.

Balance + session-spend chip for DSH: queries the official DeepSeek Open Platform balance endpoint using the harness's own DEEPSEEK_API_KEY (key travels only over a bounded node subprocess stdin — never in command lines, logs, or UI), estimates current-session spend from provider-reported token usage priced with the official peak/off-peak table, shows a top-bar chip 余额 ¥x | 会话 ≈¥y with hover detail tooltip, a Settings page (auto-refresh interval, UI language, editable price table), a deepseek_balance model tool, and pause-aware refresh that stops querying after 2 idle cycles.

Usage & Billing ★ 5 updated 2026-08-16
View on GitHub ↗

Install

dsh plugin --profile web add @lemcae/dsh-balance

npm package @lemcae/dsh-balance 0.1.7 (registry-verified 2026-08-26). Recommended: dsh plugin --profile web add @lemcae/dsh-balance — installer adds the package to the web profile deps + bundle list and the loader applies the in-package cordis.patch.yml after restart. Manual: add "@lemcae/dsh-balance" to dependencies and dsh.profile.bundles in ~/.dsh/profiles/web/package.json, then pnpm install + restart. Peer deps: @deepseek-ai/* ^0.1.0-rc.5 line, @deepseek-ai/cordis ^4.0.1, react.

Compatibility

DeepSeek Harness web profile (rc.5/rc.6 peer line). Host + Web Client composition plugin riding the built-in commands Remote namespace — no host-repo changes required.

Details

Recent updates

v0.1.7: top-bar chip; session spend estimate; settings page; deepseek_balance tool; pause-aware auto-refresh; loopback-only key handling.

FAQ

Is my API key exposed?
No — the key is read by the host from the harness credential and travels only over a bounded node subprocess's stdin; it never appears in command lines, logs, or the UI.
Is the spend estimate exact?
No — it is an estimate from provider-reported token usage priced with the official peak/off-peak table. The official DeepSeek bill is authoritative.
How do I refresh?
Click the chip to refresh immediately, or rely on the auto-refresh (15s–5min interval, pauses after 2 cycles without new conversation activity).

Alternatives

crazywoola/dsh-balance · Ghost011118/dsh-balance-meter · stevenx65/dsh-balance-plugin

More plugins in Usage & Billing

Browse more in Usage & Billing

Guides for Usage & Billing plugins