yingjunnan/dsh-deepseek-quota
DeepSeek API 配额(余额)小组件,用于 DSH 网页图形界面:一个浮动在右下角的卡片,显示剩余的 DeepSeek API 余额。
Project Overview项目介绍
This is a native plugin built exclusively for the DeepSeek Harness (DSH) web GUI. It adds a floating overlay card pinned to the bottom-right corner of the DSH web interface that displays your remaining DeepSeek API balance, today’s total consumption, current conversation cost, and an indicator for DeepSeek’s current peak or off-peak pricing period. The plugin auto-refreshes balance data every 60 seconds and conversation cost every 5 seconds, and it also includes a manual refresh option for users who want to check updated data immediately. The card can be collapsed into a small wallet icon to save screen space, and it automatically matches DSH’s light or dark theme.
To install the plugin, you first need to have pnpm installed on your system. If you already have the DSH CLI set up, you can run the command dsh plugin --profile web add dsh-deepseek-quota to automatically install and configure the plugin. If you do not have the DSH CLI installed locally, you can use npx to run the same command to get the plugin added to your DSH web profile. After installation completes, you just need to restart the DSH web app, open http://127.0.0.1:3080 and refresh the page, and the quota card will appear in the bottom-right corner.
The plugin automatically reads the same DEEPSEEK_API_KEY that your DSH installation already uses, so you do not need to enter your API key a second time. To get official, accurate daily consumption data, you can optionally add your DeepSeek platform user token to your DSH credentials; without the token, the plugin will fall back to estimating daily consumption from balance changes and clearly mark the value as an estimate. All pricing logic is based on DeepSeek’s official price table, including the peak/off-peak pricing that goes into effect August 17, 2026, and the project is released under the open-source MIT license.
这是一个专为 DeepSeek Harness (DSH) 网页界面开发的原生插件,会在页面右下角悬浮显示你的 DeepSeek API 余额、今日消费额度、当前对话费用,同时提示当前 DeepSeek API 的峰谷计价时段,方便用户随时掌握 API 使用成本。它支持自动刷新,余额每 60 秒刷新一次,对话费用每 5 秒刷新,也支持手动刷新,还可以折叠成小钱包图标,不遮挡界面内容。
安装需要依赖 pnpm 包管理器,如果你已经安装了 DSH CLI,可以直接运行 dsh plugin --profile web add dsh-deepseek-quota 完成安装,没有安装 CLI 的话可以用 npx 执行同样的命令。安装后重启 DSH 网页应用,刷新页面后就能在右下角看到额度卡片。插件会自动读取 DSH 已配置的 DEEPSEEK_API_KEY,不需要额外重复配置。
如需获取准确的今日消费数据,可额外配置 DeepSeek 平台会话令牌,未配置令牌时插件会通过余额差值估算今日消费,并明确标注为估算值。插件自动跟随 DSH 的浅色/深色主题,API Key 不会离开本机,保证安全性。项目采用 MIT 许可开源,所有计算逻辑基于 DeepSeek 官方定价规则实现,包括 2026 年 8 月起生效的峰谷定价政策。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-deepseek-quota(yingjunnan/dsh-deepseek-quota)
仓库:https://github.com/yingjunnan/dsh-deepseek-quota
本站详情页:https://www.yhbd.top/plugins/yingjunnan-dsh-deepseek-quota/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证 MIT · ⭐ 3 · 最近提交 2026-08-31 · 主语言 JavaScript
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【1 兼容性检查】
① 我这边:DSH 版本、Node 版本、操作系统、当前 profile(web / desktop)。
② 读它的 README、package.json、插件 manifest,列出它要求的 DSH 版本 / Node 版本 / 操作系统 / 外部依赖 / 需要另外先装的运行时。
③ 逐条比对,结论只写「满足 / 不满足 / 未知」三种;不满足的给出可行替代方案。
④ 检查是否和我已装的插件冲突:命令名重复、skill / tool 重名、端口占用、重复注册的 MCP server。
【2 安全性检查】
① 仓库可信度:和上面「本站登记」是否一致;star / fork 数、创建时间、最近提交,是否归档或长期停更。
② 安装脚本:逐行看 package.json 的 preinstall / install / postinstall,以及 install.sh、setup.ps1 之类脚本。出现 curl|bash、下载后直接执行、混淆代码、访问与插件功能无关的域名,立刻停下来告诉我,不要继续装。
③ 依赖:列出新增依赖,标出无人维护、或与知名包拼写近似的可疑包(typosquatting)。
④ 权限与副作用:它会读写哪些目录、访问哪些域名、需要哪些 DSH 权限(filesystem / network / shell / clipboard 等),以及怎么卸载和回滚。
⑤ 如果它要求 sudo / 管理员权限,或权限明显超出功能所需,先停下来问我。
【3 安装】
上面两步没有「不满足」和「高危项」时才执行;用官方推荐方式安装,不要自行提权。
【4 汇报】
用表格输出:检查项 / 结论 / 依据 / 是否需要我决策。拿不准的一律写「未知」并说明要我怎么确认——不要猜,也不要替我决定。
Send this message to DSH in your current session: it verifies compatibility and security first (answering met / not met / unknown item by item) and only installs once everything checks out — it will stop and ask you if it finds a high-risk item. The box scrolls; the copy is the full prompt. CLI install commands may not be accurate across systems, so DSH is the safer route.把上面这条消息直接发给当前会话里的 DSH:它会先核对兼容性与安全性(逐条给「满足 / 不满足 / 未知」),确认没问题再安装,有高危项会停下来问你。框内可滚动,复制到的是完整提示词;安装命令不一定准确,发给 DSH 更稳。
- Only 3 stars - very few users, little community feedback星标只有 3,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项
Compatibility兼容性
- DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
- External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
- Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册
Security安全性
- Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
- Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
- curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
- Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
- Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
- Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式
Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。
Or use CLI install (for developers)或使用命令行安装(适合开发者)
CLI Install命令行安装
dsh plugin --profile web add dsh-deepseek-quota
把 yingjunnan/dsh-deepseek-quota 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-deepseek-quota
A DeepSeek Harness (DSH) web GUI plugin: shows your remaining DeepSeek API quota (balance) and today's consumption in a floating card pinned to the bottom-right corner of the page.

中文文档在前,英文说明见下文。/ Chinese docs first, English below.
中文说明
一个给 DeepSeek Harness(DSH)网页界面用的插件:在页面右下角悬浮显示你的 DeepSeek API 额度(余额) 与 今日消费。
功能
- 右下角悬浮卡片(注册在框架级
shell.overlay槽位,纯叠加、不遮挡应用)。 - 显示总余额、可用状态、当前对话费用、今日已消费、赠送余额与充值余额。
- 当前对话费用:宿主侧对每条
assistant/message按官方价格表计价(含 2026-08-17 起峰谷定价;定价引擎移植自 dsh-web-billing,MIT),通过GET /api/deepseek-session-cost?sessionId=<id>返回当前会话累计费用——按持久化日志全量回放,包含安装前(重启前)的历史。把鼠标放到费用后面的圆圈叹号 ⓘ 上,会显示代入真实数值的计算公式(输入/缓存命中/输出 tokens × 单价 = 小计,单价为加权有效价 ¥/M)。 - 余额每 60 秒自动刷新、对话费用每 5 秒刷新,也可手动刷新。
- 峰谷时段提示:显示当前处于 DeepSeek 的高峰(工作日 09:00–12:00 / 14:00–18:00,北京时间)还是空闲时段(2026-08-17 起;周六、周日全天空闲),让你知道现在跑模型更贵还是更便宜;随余额每 60 秒刷新。
- 可折叠为小钱包图标:点卡头右下角的箭头即可把卡片收成右下角的一个小钱包图标(点击可展开);折叠态下钱包图标会以颜色标识当前峰谷(高峰=红、空闲=绿、常规=灰)或错误状态,颜色随余额每 60 秒刷新。
- 自动跟随应用浅色/深色主题(使用
--dsw-*设计变量)。 - 明确的错误状态:未配置 Key、网络失败、接口报错等。
- API Key 不出本机:浏览器只访问本地路由(由宿主侧注册)。
安装
需要 pnpm。
# 已安装 dsh CLI:
dsh plugin --profile web add dsh-deepseek-quota
# 未安装 dsh CLI(例如通过 npx 启动):
npx @deepseek-ai/dsh plugin --profile web add dsh-deepseek-quota
该包声明了 dsh.bundle,dsh plugin 会自动把它加进 profile 的 bundle 层(无需手动改配置)。之后:
- 重启网页应用:
dsh web(若无 dsh CLI,用npx @deepseek-ai/dsh web;bundle 层在启动时读取)。 - 打开 http://127.0.0.1:3080 并刷新页面。
- 右下角即出现额度卡片。
手动方式:把包放进 profile 的
node_modules,并在~/.dsh/profiles/web/cordis.patch.yml中加一条:- insert: - id: deepseek-quota name: dsh-deepseek-quota
配置
插件读取的正是 harness 自己在用的那个 Key:DEEPSEEK_API_KEY(通过凭证服务解析;在 设置 → 模型 页面填写,存于 ~/.dsh/.credentials.yaml,或在启动环境中导出)。
今日消费(今日已消费)
DeepSeek 官方 API 没有开放用量查询接口,所以插件按优先级使用两种来源:
官方数据(优先)——与平台控制台相同的可按日期筛选的数据。需要配置可选的平台会话令牌:
# 获取令牌:登录 https://platform.deepseek.com,打开 DevTools → Console,执行: # JSON.parse(localStorage.getItem('userToken')).value # 然后把值写入凭证(例如追加到 ~/.dsh/.credentials.yaml): # DEEPSEEK_PLATFORM_TOKEN: <令牌>
Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →
MeteorNOX/DeepSeek-Balance-Whale-Widget
Lxiayu/DshCockpit
feiyang-dev/dsh-usage-plugin
Witherwithwinter/DeepSeek-Balance-Whale-Widget-Bowl
wenzetan/dsh-quota-panel
nonewind/dsh-spend
lssyd20070106/dsh-ui-preset-enhance