yingjunnan/dsh-deepseek-quota ↗★ 0
dsh-deepseek-quota
用于 dsh Web GUI 的 DeepSeek API 配额小部件:在固定于右下角的浮动卡片中显示剩余的 DeepSeek API 余额(shell.overlay 插槽)。
安装
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:yingjunnan/dsh-deepseek-quota说明文档
阅读完整 README ↗dsh-deepseek-quota
A plugin for the DeepSeek Harness (DSH) web GUI that shows your remaining DeepSeek API quota (balance) in a floating card pinned to the bottom-right corner of the page.
中文说明见下文。
Features
- Bottom-right overlay card (registered into the frame-wide
shell.overlayslot — additive, never blocks the app). - Shows total balance, availability, current conversation cost, today's consumption, and the granted / topped-up balance.
- Current conversation cost (
当前对话费用): the host prices everyassistant/messagewith the official DeepSeek price table (incl. peak/off-peak since 2026-08-17; pricing engine ported from dsh-web-billing, MIT) and reports the current session's accumulated cost viaGET /api/deepseek-session-cost?sessionId=. - Auto-refreshes every 60 s (balance) / 5 s (conversation cost), plus a manual refresh button.
- Follows the app's light/dark theme (
--dsw-*tokens). - Explicit error states: missing API key, network failure, provider errors.
- The API key never leaves your machine — the browser only talks to local routes that the host half registers.
Install
Requires the DSH CLI and pnpm.
dsh plugin --profile web add dsh-deepseek-quota
The package declares dsh.bundle, so dsh plugin automatically adds it to the profile's bundle layers (no manual patch editing). Then:
- Restart the web app:
dsh web(bundle layers are read at boot). - Open http://127.0.0.1:3080 and refresh the page.
- The balance card appears at the bottom-right.
Manual alternative: install the package into the profile's
node_modulesand add a loader entry to~/.dsh/profiles/web/cordis.patch.yml:- insert: - id: deepseek-quota name: dsh-deepseek-quota
Configuration
The plugin reads the same API key the harness already uses: , resolved through the credentials service (set it on the page; it is stored in , or export it in the launching environment).