bobcat848/dsh-calculator 预览 preview

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内核浏览器完成实测。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • 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 →

← 上一个 Prev tool-repair-skill-for-hermes-and-opencode 下一个 Next bga-dsh-workbench →