- Início
- Plugins
- Uso e cobrança
- dsh-deepseek-balance-plus
dsh-deepseek-balance-plus
biubiup0/dsh-deepseek-balance-plus
DeepSeek Harness (DSH) plugin: live DeepSeek API account balance in the left sidebar footer with auto refresh and one-click official top-up. · 左侧栏底部常驻 DeepSeek 余额,自动刷新,一键跳转官方充值页。
Instalar
dsh plugin --profile web add github:biubiup0/dsh-deepseek-balance-plusREADME
dsh-deepseek-balance-plus
A DeepSeek Harness (DSH) third-party plugin: shows your DeepSeek API account balance in the left sidebar footer, auto-refreshes, and offers a one-click jump to the official top-up page.
简体中文 · English
Features
- Persistent balance pill in the sidebar footer:
¥ 余额 ¥xx.xx— the same account balance as the usage page. Collapses to a compact ¥ badge when the sidebar shrinks to the 56px rail. - Auto refresh every 5 minutes against the official endpoint
GET https://api.deepseek.com/user/balance - Detail panel on click: total / granted amounts per currency, key source, last update time, manual refresh
- One-click top-up: the panel's
充值button opens the officialhttps://platform.deepseek.com/top_uppage in your default browser - Zero-config key reuse: prefers the DSH-managed
DEEPSEEK_API_KEYcredential — no key input needed. Falls back to a paste box (kept in host memory only) when no configured key exists.
Install
dsh plugin --profile web add dsh-deepseek-balance-plus
Requires a DSH web/desktop build with the dsh.client client-module system
(the same era as dshmarket / dsh-better-sidebar).
Security
- Reads the official balance endpoint only; the plugin never stores or uploads secrets, and its host routes never return key material.
- Reuses DSH's own configured credential, or an in-memory manual key.
- The top-up button opens the official URL in your browser; no third-party hop.
Build / develop
Zero runtime dependencies (peer @deepseek-ai/cordis only); nothing to install.
node scripts/build.mjs # mirrors src/ -> lib/ (host half); client/client.js is the final bundle
npm pack # publishable tarball (runs prepack)
Layout:
src/balance-core.js— host balance core (credential resolution / subprocess+curl / summary)src/index.js— host Cordis plugin entry (registers/dsh-balance/*webServer routes)client/client.js— browser bundle (__ModuleLoader__.loadformat) registering the widget into the client slot system (sidebar.footer.action)
Host routes (same-origin, no secrets returned):
| Method | Path | Purpose |
|---|---|---|
| GET | /dsh-balance/state | cached snapshot (also warms a fetch) |
| POST | /dsh-balance/refresh | re-query the official balance API |
| POST | /dsh-balance/key | store an in-memory manual API key |
| POST | /dsh-balance/topup | open the official top-up page |
Publish to the community market
- Publish the npm package (
npm publish— needs your npm account). Verify the name is free first:npm view dsh-deepseek-balance-plus version; pick a unique name (optionally under your scope) if it is taken. - Submit it to the awesome-dsh-plugin curated
list (GitHub:
awesome-dsh-plugin/awesome-dsh-plugin), categoryusage · 用量与计费. - Once listed, dshmarket users can one-click install it.
Caveat: any marketplace that asks you to paste your DeepSeek API key is a phishing pattern. This plugin only ever reads the DSH-managed credential.
License
Plugins relacionados
DeepSeek-Balance-Whale-Widget
meteornox/deepseek-balance-whale-widget
dsh-context
bowenliang123/dsh-context
dsh-cost-meter
han-1413141/dsh-cost-meter
TokenLedger
zh667/tokenledger