bobcat848/dsh-calculator
计算DeepSeek Harness发出的DeepSeek API调用的实时成本。
Project Overview项目介绍
This is a native web plugin built exclusively for DeepSeek Harness (DSH) that displays estimated DeepSeek API usage costs and live account balance in a collapsible floating card pinned to the top-right corner of the DSH web GUI. It can be installed with a single one-line command that downloads files directly from GitHub and configures the plugin automatically, or via manual clone and copy for users who prefer local installation. It adds a host component for cost tracking and balance fetching, plus a browser component for the overlay UI, and requires a DSH web restart after installation to activate, though hot reload usually works for config changes.
This plugin is designed for DSH users who regularly call DeepSeek official models and want to track their spending in real time to avoid unexpected overage charges. After installation, you just need to refresh your DSH web instance at http://127.0.0.1:3080 to see the cost card in the top-right corner. It shows current session cost per model, total daily spend in your local timezone, and live account balance pulled from the DeepSeek API, and you can collapse the full card to a small pill that always displays today’s total spend. It automatically switches between Chinese and English to match your browser’s default language setting.
This plugin is released under the open-source MIT license, and requires no extra configuration beyond the DeepSeek API key that DSH already stores in its local credentials file. It only supports DSH version 0.1.0-rc.6 and newer, as older versions lack the shell.overlay layout slot the current plugin version uses. It has been tested only on Chromium-based browsers like Chrome and Edge, cost estimates may differ from official DeepSeek billing, and it is not affiliated with the official DeepSeek project in any way. If you want to uninstall it, you just delete the plugin folder and remove the corresponding loader line from your cordis patch configuration file.
这是专为DeepSeek Harness(DSH)开发的原生插件,用于在DSH网页界面右上角展示DeepSeek API的使用费用估算和账户实时余额。插件将信息整合在可折叠悬浮卡片中,支持折叠为显示当日总费用的胶囊按钮,仅统计DeepSeek官方路由的模型调用,第三方模型不计入费用统计,同时适配DeepSeek最新的峰谷计价和周末半价规则。
该插件面向日常使用DeepSeek API通过DSH开发对话的用户,帮助用户实时掌握费用消耗情况,避免因不知情产生意外超额支出。安装完成重启DSH网页服务后,刷新浏览器即可在右上角看到费用卡片,点击折叠按钮可将其收缩为显示总费用的胶囊,点击胶囊可重新展开查看详细数据,界面会自动跟随浏览器语言切换中英文。
该插件采用MIT许可证免费开源,无需额外配置密钥,可直接复用DSH已存储的DeepSeek API密钥拉取账户余额数据。它仅兼容带shell.overlay插槽的DSH 0.1.0-rc.6及以上版本,旧版DSH需使用对应旧版插件,费用为估算值,可能与官方账单存在差异,目前仅在Chromium内核浏览器完成实测。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-calculator(bobcat848/dsh-calculator)
仓库:https://github.com/bobcat848/dsh-calculator
本站详情页:https://www.yhbd.top/plugins/bobcat848-dsh-calculator/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证 MIT · ⭐ 4 · 最近提交 2026-09-09 · 主语言 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 4 stars - very few users, little community feedback星标只有 4,几乎没人在用,遇到问题缺少社区反馈
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:bobcat848/dsh-calculator
把 bobcat848/dsh-calculator 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-calculator
A DeepSeek Harness (DSH) web plugin that shows your DeepSeek API spend and account balance in a top-right floating card of the DSH web GUI (collapsible to a pill).
- 当前会话费用 — the cost of the session you are looking at (per model)
- 当天全部会话累计 — today's total spend across all sessions (per model, in your local timezone; resets at local midnight)
- 胶囊实时费用 — the collapsed pill shows today's total spend live
- 账户余额 — live balance from the DeepSeek API (
GET /user/balance) - 第三方模型不计费 — only DeepSeek official routes (
deepseek-official与视觉专用deepseek-vision) are billed; any other provider/model is listed as unbilled - 峰谷计价 — prices events by the Beijing peak/off-peak schedule (peak 09:00–12:00 & 14:00–18:00, off-peak = half price); events before 2026-08-17 are still billed at the then-current flat rates
- 中英文界面 — the panel follows your browser language (
zh/en)
安装
DSH is a Cordis application. The plugin has a host half (event accounting +
balance fetching) and a browser half (top-right overlay card). Install it into
the web profile:
一条命令在线安装(推荐,无需克隆仓库)
直接在你的机器上执行(脚本会从 GitHub 下载插件文件并完成安装):
# macOS / Linux
curl -fsSL https://raw.githubusercontent.com/bobcat848/dsh-calculator/main/install.sh | bash
# Windows PowerShell
irm https://raw.githubusercontent.com/bobcat848/dsh-calculator/main/install.ps1 | iex
本地克隆安装
或者克隆仓库后运行脚本(安装脚本会自动识别本地模式,从仓库内复制文件):
git clone https://github.com/bobcat848/dsh-calculator.git
cd dsh-calculator
# macOS / Linux
bash install.sh
# Windows PowerShell
.\install.ps1
两种方式等价:都会把插件装进
~/.dsh/profiles/node_modules/dsh-calculator 并在
~/.dsh/profiles/web/cordis.patch.yml 追加 loader 行(幂等:重复执行安全,
已有行不会重复添加)。
手动安装
# 1. copy the package into the profile's hoisted node_modules
mkdir -p ~/.dsh/profiles/node_modules/dsh-calculator
cp -r lib package.json ~/.dsh/profiles/node_modules/dsh-calculator/
# 2. append the loader row to the web profile patch (once)
# edit ~/.dsh/profiles/web/cordis.patch.yml and add:
# - insert:
# - id: dsh-calculator
# name: 'dsh-calculator'
# config: {}
重启生效
Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →
edison7009/EchoBird
edonadei/caliper
Make0209/dsh-usage-stats
HaoyueQin/dsh-usage-statistics-panel
tma1-ai/dsh-otel
zhangzheng25/dsh-token-monitor
283Gawin/dsh-heatmap