jelly-000/dsh-balance-monitor

DeepSeek account balance, remaining-ratio bar and today's spend in the dsh si

dsh-balance-monitor shows your DeepSeek API account balance right in the dsh sidebar footer: the balance, a thin remaining-ratio bar, and how much the current day has cost, pinned above Settings and styled with the stock design tokens. Live balance queries GET https://api.deepseek.com/user/balance through the host half; the first successful query of a calendar day becomes that day's baseline (spend = max(0, baseline - current), refills clamp to 0); the ratio bar runs blue → amber → red as the balance drops; it collapses to a 36px circle with a compact amount and tooltip; and it polls every 60s plus re-polls on tab visibility, keeping the last known numbers (dimmed as stale) on upstream failure instead of an error flash. The API key never leaves the host — the browser half only ever sees balance numbers over the loopback RPC channel.

Web UI Enhancements ★ 10 updated 2026-08-28 ✅ runtime-tested
View on GitHub ↗

Install

dsh plugin --profile web add dsh-balance-monitor

Works from source directly (the browser bundle is a hand-written classic script with no build step, so a git install needs no prepare script) with dsh plugin --profile web add "github:<you>/dsh-balance-monitor#main", or from npm once published with dsh plugin --profile web add dsh-balance-monitor (npm 1.0.7 published as of 2026-08-23). Then restart the Web UI (dsh --profile web); the widget appears at the bottom of the expanded sidebar, above Settings.

Compatibility

DeepSeek Harness (dsh) web profile. Registered on the official sidebar.footer.action slot — above Settings, no patch hacks. Host half registers one RPC channel /balance on ctx.connection (loopback trust fence); reads DEEPSEEK_API_KEY from $DSH_HOME/.credentials.yaml (env var wins); state persisted in $DSH_HOME/storages/balance-monitor.json.

Details

Recent updates

The current README documents the features table, install (git source and npm), how it works (host half /balance RPC channel, browser half sidebar.footer.action card, state file format), security notes (loopback trust, no telemetry), and the MIT license.

FAQ

Is my API key exposed to the browser?
No — the API key never leaves the host: the browser half only sees balance numbers over the RPC channel, served under the loopback trust authority.
How is today's spend calculated?
The first successful query of a calendar day becomes that day's baseline (persisted in $DSH_HOME/storages/balance-monitor.json); spend = max(0, baseline − current), and refills clamp to 0 instead of going negative.
What happens if the balance API fails?
The last known numbers stay visible, dimmed as stale, instead of an error flash; polling retries every 60s and re-polls when the tab becomes visible.

Alternatives

crazywoola/dsh-balance · TwotwoPiggy/dsh-balance · feibi-mochi/deepseek-harness-wallet

More plugins in Web UI Enhancements

Browse more in Web UI Enhancements

Guides for Web UI Enhancements plugins