dsh-usage-card
Manifest validDSH web sidebar usage card: 7d/30d tokens, spend, and remaining DeepSeek balance
dsh-usage-card
在 DeepSeek Harness 側欄的「設置」上方,放一張用量卡片:最近花了多少 token、多少錢、還剩多少額度。

- 近 7 天 / 近 30 天:token 用量與消費
- 剩餘額度:沿用你在設置裡填的 DeepSeek API Key
- 官方或估算:有平台登入 token 就跟 DeepSeek 用量頁 對齊;沒有就用本機對話紀錄估算
- 側欄收合時變成小圖示,點一下仍可設定
安裝
適用 DeepSeek Harness Web 介面(0.1.x)。裝完後重啟 dsh web,再刷新瀏覽器。
dsh plugin --profile web add github:kazma258/dsh-usage-card
本機開發目錄改用 dsh plugin --profile web add ./。若之後發布到 npm,則用 dsh plugin --profile web add dsh-usage-card。
卸載:
dsh plugin --profile web remove dsh-usage-card
改看官方數據
卡片預設是「估算」。點右上角的 估算 / 官方 / 無數據,貼上平台 userToken(不是 API Key)。過期後會自動退回估算。
取得方式:登入 platform.deepseek.com → 瀏覽器開發者工具 → Console:
JSON.parse(localStorage.getItem('userToken')).value
進階設定
可在 profile 的 cordis.patch.yml 覆寫單價與幣種(整行替換,不會只改其中一個欄位):
- id: usage-card
name: dsh-usage-card
config:
estimatePrices:
inputUncached: 0.28
cacheRead: 0.07
cacheWrite: 0.28
output: 1.1
estimateCurrency: USD
officialCurrency: USD
其他可調項:path、tokenPath、balanceCredential、balanceUrl、balanceTtlMs、platformTokenCredential、platformBaseUrl、usageTtlMs、timeoutMs、invalidateOnTurnEnd。
卡片會在對話結束、切回分頁、每 60 秒,以及按刷新時更新。暫時不想用這張卡時,從該 profile 的 bundle 列表拿掉 dsh-usage-card 再重啟即可。
開發
node --check lib/index.js lib/client.js lib/aggregate.js
node test/aggregate.test.mjs
建議鎖定 commit 安裝:github:kazma258/dsh-usage-card#<40-character-sha>。驗證是否掛上可跑 dsh --profile web --dump-config。
License
MIT
Comments
Loading…
Similar plugins
by stevenx65
DeepSeek balance and token usage in the web sidebar, with a today/all-time toggle and provider filtering.
★ 6
↓ 793/wk
MIT
JavaScript
Aug 14, 2026
dsh plugin --profile web add dsh-balance-pluginby ericw0315
Sidebar panel for account balances and local token usage, with provider/model breakdowns and a 27-week daily heatmap.
★ 3
↓ 295/wk
MIT
JavaScript
Sep 10, 2026
dsh plugin --profile web add dsh-usage-liteby kai-GitHubaccount
DeepSeek 余额 + Token 用量面板(DSH Web):三级预警、自定义阈值、一键充值、缓存命中率 | Balance & usage panel for DeepSeek Harness
★ 0
MIT
JavaScript
Sep 21, 2026
dsh plugin --profile web add dsh-usage-panelby novaschai7
DeepSeek account balance, today's token usage and estimated spend in the dsh Web client sidebar. · 在 dsh 侧边栏显示 DeepSeek 余额、今日 token 用量与花费估算。
★ 0
MIT
JavaScript
Sep 30, 2026
dsh plugin --profile web add dsh-plugin-balance-uiby xie-tj
Persistent token-usage ledger and Web Usage dashboard for DeepSeek Harness.
★ 3
MIT
JavaScript
Sep 15, 2026
dsh plugin --profile web add dsh-plugin-usage-ledgerby y2zyyr
Persistent local token usage sidebar and settings page for DeepSeek Harness (DSH), with automatic history discovery and a durable SQLite ledger.
★ 3
↓ 1.2k/wk
MIT
JavaScript
Oct 4, 2026
dsh plugin --profile web add @y2zyyr/dsh-token-usage-sidebar