golitter/dsh-deepseek-billing
在DSH中查看DeepSeek API账户余额与计费信息
Project Overview项目介绍
This is a native plugin built exclusively for DeepSeek Harness (DSH). It adds a dedicated Billing page to DSH’s web settings interface, letting users check their DeepSeek API account balance securely without exposing their API key. The plugin displays available balance, recharged balance, and bonus balance, supports manual refreshing, and retains the last successfully fetched balance if a refresh attempt fails. It also supports real-time switching between Chinese and English interfaces, adapts to both light and dark themes, and works well on narrow screens.
In addition to the balance display on the settings page, the plugin also adds a slash command /deepseek-billing that can be used inside DSH conversations to quickly get the current balance. If you run this command in a newly created blank conversation, the result will appear as a temporary tooltip next to the input box instead of being saved to the conversation history. The temporary tooltip automatically clears when the conversation is activated, after one minute expires, or when you switch away from the blank conversation, so it doesn’t leave any unwanted historical records.
To install the plugin, you just need to run the DSH CLI command dsh plugin --profile web add github:golitter/dsh-deepseek-billing in your terminal. After installation completes, you need to add your DeepSeek API Key to your $DSH_HOME/.credentials.yaml file, and set the correct file permissions to 600 on POSIX systems to keep your key secure. Then you can start DSH web and access the Billing page from the settings menu to check your balance any time. The plugin intentionally limits its scope to only balance checking, so it doesn’t add extra features like usage history or consumption alerts.
这是一个专为 DeepSeek Harness(DSH)开发的原生插件,用于在 DSH 的 Web 设置界面中新增「计费 / Billing」页面,帮助用户安全查看 DeepSeek API 的账户余额信息。它可以展示 API 可用余额、充值余额与赠送余额,支持手动刷新,刷新失败时会保留最近一次成功获取的余额和更新时间,适配明暗主题和窄屏布局,并且通过 DSH 凭证库安全读取 API Key,密钥不会发送到浏览器端。
除了设置页的余额展示,该插件还提供对话内斜杠命令 /deepseek-billing,用户可以在任意对话中快速查询余额。如果在新建的空白会话中使用该命令,结果会显示在输入框旁的临时提示中,不会进入对话记录,并且会在会话激活、1分钟到期或切换离开时自动清除,不会留下多余的查询历史。
用户可以通过 DSH 命令行 dsh plugin --profile web add github:golitter/dsh-deepseek-billing 一键安装,安装后需要在 $DSH_HOME/.credentials.yaml 中配置 DeepSeek API Key,设置好后启动 DSH Web 即可使用。该插件严格控制功能范围,仅专注于安全的余额查询,不提供消费历史、用量预测等扩展功能,符合开发者的第一性原理设计思路。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-deepseek-billing(golitter/dsh-deepseek-billing)
仓库:https://github.com/golitter/dsh-deepseek-billing
本站详情页:https://www.yhbd.top/plugins/golitter-dsh-deepseek-billing/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证未声明 · ⭐ 2 · 最近提交 2026-09-20 · 主语言 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 更稳。
- No license declared - all rights reserved by default; ask the author before commercial use or redistribution未声明开源许可证 —— 默认「保留所有权利」,商用或再分发前先问作者
- Only 2 stars - very few users, little community feedback星标只有 2,几乎没人在用,遇到问题缺少社区反馈
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 github:golitter/dsh-deepseek-billing
把 golitter/dsh-deepseek-billing 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-deepseek-billing
简体中文 · English
功能概述
在 DeepSeek Harness 的 Web 设置页中增加“计费 / Billing”页面,提供:
- DeepSeek API 可用余额、充值余额和赠送余额展示
- 手动刷新及加载、空数据、错误状态;刷新失败时保留最近一次成功余额和更新时间
- 中文、英文实时切换
- 明暗主题与窄屏适配
- API Key 通过 DSH 凭证库安全读取,不会发送到浏览器
- 对话内斜杠命令
/deepseek-billing快速返回余额;新建空白会话保持当前页面并显示临时提示,提示在会话激活、1 分钟到期或切换离开时自动清除,空白阶段的查询记录不会在会话激活后重新出现
第一性原理
这个插件只解决一个最基本的问题:在不暴露 API Key 的前提下,让用户可靠地看到 DeepSeek 账户的真实余额。
因此,当前功能有意保持克制:宿主负责安全读取凭据并请求 DeepSeek 官方余额接口,客户端只展示接口返回的余额,并提供手动刷新和稳定的错误反馈。插件不实现消费历史、趋势图、用量预测、余额告警、自动充值或 API Key 管理等扩展能力;这些功能要么缺少可靠的数据来源,要么超出了“查询余额”这一核心职责。没有实现它们是基于第一性原理做出的范围选择,而不是用虚构数据填充界面。
安装与使用
安装插件:
dsh plugin --profile web add github:golitter/dsh-deepseek-billing在
$DSH_HOME/.credentials.yaml中配置 DeepSeek API Key:version: 1 refs: DEEPSEEK_API_KEY: sk-xxxxxxxxxxxxxxxxDSH 启动时会迁移已存在的旧扁平凭据文档;新文档请直接使用
version: 1和refs格式。POSIX 系统上应限制文件权限,例如chmod 600 "$DSH_HOME/.credentials.yaml";不要在文档、日志或截图中记录真实密钥。启动 DSH Web:
dsh --profile web打开“设置 → 计费 / Billing”查看余额;点击“刷新 / Refresh”可重新获取。首次请求失败会显示完整错误状态;已有余额后的刷新失败会保留旧余额,并在页面中显示非阻塞提示。


也可在对话中直接输入无参数命令
/deepseek-billing快速查看余额;在新建空白会话中,结果显示在输入框旁的临时提示中,不会进入对话记录页,并在会话激活、1 分钟到期或切换离开时自动清除;空白阶段执行过的余额命令不会在会话激活后重新显示为历史卡片。宿主已保存zh/en偏好时,斜杠菜单说明、标签、空态、错误和用法提示跟随语言并在切换后更新;远程浏览器仅有进程内语言或偏好不可用时,菜单说明回退英文,结果回退为不带标签的「币种 + 金额」、固定英文用法提示及稳定错误码。
配置与安全
详见 配置与安全。其中 timeoutMs 必须为大于 0 且不超过 120000 毫秒的有限数值,避免 Node.js 定时器溢出;设置页的等待超时会自动对齐该值(响应中附带 timeoutMs,客户端按其加余量对齐)。
当前发布线为 0.2.0,支持 DSH >=0.1.5-rc.2 <0.1.6。余额路由通过 DSH Connection 的 Fetch 注册,继承 DSH 的 Host/Origin 信任检查和浏览器 Cookie 认证;认证由 DSH 启动 URL 完成,插件不会自行实现或记录 Cookie。0.1.6-alpha 尚未纳入支持范围。
MeteorNOX/DeepSeek-Balance-Whale-Widget
edison7009/EchoBird
Han-1413141/dsh-cost-meter
wssfk12138/dsh-damage-pulse
zh667/TokenLedger
edonadei/caliper
Ychris12138/dsh-usage-stats
Aisland-SJL/dsh-usage