Live DeepSeek API balance in the sidebar footer plus an always-visible bottom-right pill: status dot and amount, refreshed every 60 seconds, the API key is read from the local credential store and never embedded.
Install
# from a prebuilt release tarball
dsh plugin --profile web add "https://github.com/AKUSH99/dsh-balance-chip/releases/download/v1.0.1/dsh-balance-chip-1.0.1.tgz"
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:AKUSH99/dsh-balance-chip
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
This plugin publishes its README in Chinese only.
Show your DeepSeek API balance directly inside the DSH app, in two places:
- Bottom-right pill – always visible, non-blocking (
pointer-events: none), dot + amount, auto-refresh every 60 s - Sidebar footer – beside Settings (dot in rail mode)

- 🟢 green ≥ $5 · 🟠 orange < $5 · 🔴 red on errors
- Tooltip shows currency and last update time
- Your API key never ships with this plugin – it is read at runtime from your local DSH credential store, and the only network call goes to the official
api.deepseek.com/user/balanceendpoint from the host side.
Prerequisites
Your DeepSeek API key must be stored in the DSH credential store under the reference DEEPSEEK_API_KEY (this is the same place the built-in DeepSeek provider uses – the web UI's Models page writes it there). If the reference is missing, the displays show Key?.
Install
dsh plugin --profile web add github:AKUSH99/dsh-balance-chip
Restart dsh web (or use the market's one-click restart). No build step, no dependencies.
Requires dsh web 0.1.0-rc.6 or newer (same base as the plugin market).
Installation alternatives
- Plugin Market: once listed, open Settings → Plugin Market in the app, search "balance", one-click install.
- Prebuilt package: the latest release ships a ready tarball – the market offers it as the faster install path without any build step.
How it works
| Part | What it does |
|---|---|
lib/index.js (host) |
Resolves the key via the credentials service, polls GET https://api.deepseek.com/user/balance every 60 s, serves the cached state at GET /dsh-balance |
client/client.js (web) |
Registers a sidebar.footer.action item and a shell.overlay pill that fetch /dsh-balance and render dot + amount |
No telemetry, no external dependencies, everything stays on your machine.
Troubleshooting
Key?in the chip/pill – noDEEPSEEK_API_KEYreference in your credential store. Store your key via the web UI's Models page (or thecredentialsservice), then reload.…while loading – the first poll hasn't finished yet; wait a few seconds.- Red dot / error – the host couldn't reach
api.deepseek.com/user/balance; check your network and key validity.
中文说明
在 DSH 应用内实时显示 DeepSeek API 余额:右下角常驻胶囊(不阻挡点击)+ 侧边栏底部状态点,每 60 秒自动刷新。余额低于 5 美元显示橙色,出错显示红色,悬停可见币种与更新时间。API Key 绝不内置:运行时从本机 DSH 凭证库读取,仅向官方余额接口发起请求。使用前请确认凭证库中存在 DEEPSEEK_API_KEY 引用(与内置 DeepSeek 提供方相同,网页端模型页面会写入)。
FAQ
Why two displays? The sidebar chip is subtle and always in reach; the bottom-right pill gives an at-a-glance status without blocking clicks (pointer-events: none).
How fresh is the value? The host polls the official balance endpoint every 60 seconds; both displays refresh from that cached state.
Does polling cost tokens? No – the balance endpoint is separate from the chat API and does not consume paid tokens.
Currency? The official API reports the account currency; the displays show it as-is.
License
MIT
Links
More in this category
bowenliang123/dsh-context★ 3190
DSH context insight panel: Context dashboard + /context command + Context browser — one-stop context lifecycle management with categorized composition, content details, evolution trends, compaction/injection events, and stats.
Han-1413141/dsh-cost-meter★ 489
Per-session and daily API cost, budget with usage %, official balance, history dashboard, and one-click official price sync with peak/off-peak pricing.
wssfk12138/dsh-damage-pulse★ 273
Tracks DeepSeek token usage, per-call and session costs, and account balance with cache-aware charge animations in the DSH Web UI.
zh667/TokenLedger★ 199
Sidebar usage panel that attributes tokens to the relay site that served each request, read from your existing provider config: today/month/all-time totals, per-site and per-model breakdowns, a year activity heatmap, and New API / Sub2API / DeepSeek balances.
Ychris12138/dsh-usage-stats★ 183
Multi-provider usage dashboard with provider/model token breakdowns, calendar drill-downs, account balances, and OpenCode Go / Z.ai subscription quota tracking.
PolinniZhong/dsh-personal-center★ 112
Personal center for DeepSeek Harness: cross-session usage statistics, per-model cost estimation, global custom instructions, a global font-size adjuster, a data-driven desktop pet with bitmap & vector skins, and a conversation status overview, all local and offline.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.