CZ1900/suanzhang-dsh
算账 (suanzhang) — DeepSeek Harness 计费插件:余额/今日消费/按步骤费用,交易终端风格,官方价自动同步。
Project Overview项目介绍
Suanzhang is a DSH plugin that surfaces your DeepSeek balance and daily spend in the sidebar, and lists per-step CNY costs in a dedicated tab with breakdowns by model, tool, day, and session, plus a cost forecast. Use it to track DeepSeek expenses in real time. Caveat: requires Node 22+; GitHub install needs network access to github.com, otherwise use the local copy method.
算账(suanzhang)是 DeepSeek Harness(DSH)插件,在侧边栏常驻显示当前余额、今日消费,并在「算账」页签按步骤列出每笔模型调用的人民币费用,支持按模型、工具、天、会话汇总与成本预测。适合需要随时掌控 DeepSeek 花销的用户。注意:依赖 Node ≥ 22,GitHub 安装需能访问 github.com,公司网络建议改用本地复制方式。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:suanzhang-dsh(CZ1900/suanzhang-dsh)
仓库:https://github.com/CZ1900/suanzhang-dsh
本站详情页:https://www.yhbd.top/plugins/cz1900-suanzhang-dsh/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证 MIT · ⭐ 2 · 最近提交 2026-08-19 · 主语言 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 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:CZ1900/suanzhang-dsh
把 CZ1900/suanzhang-dsh 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
算账(suanzhang)· DeepSeek 花销一目了然
在 DeepSeek Harness(dsh)里装一个「算账」小助手:你的余额、今天花了多少、每一步模型调用花了多少钱——全部清清楚楚,不用再猜。
为什么要装它?
用 DeepSeek 的时候,你是不是经常想知道:
- 我的余额还有多少? —— 想查还得去网页翻,麻烦。
- 今天到底花了多少钱? —— 用完没感觉,月底才心疼。
- 这一步操作花了我多少钱? —— 表格里只有 token 数,换成人民币才直观。
- 钱都花在哪了? —— 哪个模型最烧钱?哪个工具最费钱?
装上「算账」,这些答案开机就在眼前:
| 你关心的 | 算账给你 |
|---|---|
| 余额还剩多少 | 侧边栏常驻显示,刷新/自动更新 |
| 今天花了多少 | 同样在侧边栏,一眼看到 |
| 每一步花了多少人民币 | 「算账」页签按步骤列出费用 |
| 钱花在哪了 | 按模型、按工具、按天、按会话(成本≈交付物)全部可视化 |
| 再聊下去要花多少 | 成本预测:平均每步 × 步数 |
长什么样?
简洁的交易终端风格(类似 Bloomberg 行情界面):
- 侧边栏底部:
当前余额:¥xx.xx,今天用了:¥xx.xx,点一下直接跳进算账页。 - 算账页签:顶部四格行情栏(余额 / 今天用了 / 累计 / 缓存节省)→ 下方一步步的费用明细表。
- 点击任意步骤行:自动跳到「轨迹」页签并高亮那一步,想看细节不用翻。
- 官方价自动同步:计价跟着 DeepSeek 官方页走,官方调价自动生效,不用手动改。
界面预览

侧边栏余额 & 今日消费 · 算账页签行情栏 + 步骤费用表 · 分析区条形图 + 成本预测
装它要什么?
- 一台装了 DeepSeek Harness 的电脑(
dsh web能打开)。 - 一个你自己的 DeepSeek API Key(在 Harness 设置里配好)。
- 网络(查询余额和官方价需要联网)。
前置要求与依赖坑
- Node ≥ 22:本插件用到较新的语法与 API,低于 22 会报语法错误。用
node -v确认。 - Git 必须可用:方式一通过
pnpm add <git 地址>安装,本机需有 git 且能访问 github.com。- 公司网络 / 代理 / 防火墙可能拦截 github → 改用「方式二:本地复制」最稳。
- 若曾遇到 git 凭据管理器报错(
credential.helper指向的二进制不存在),请检查全局 git 配置:git config --global credential.helper应指向真实存在的git-credential-manager.exe(如/c/Program Files/Git/mingw64/bin/git-credential-manager.exe),否则克隆/推送会失败。
- DeepSeek API Key:必须在 Harness 设置里配好(默认读
DEEPSEEK_API_KEY;若在llm-deepseek里改了apiKeyEnv/baseURL,插件会自动跟随)。没配 Key 时余额栏会提示「未配置 API Key」,但费用汇总 / 计价仍可用。
怎么安装?
方式一:GitHub 安装(推荐)
pnpm add https://github.com/CZ1900/suanzhang-dsh.git
然后编辑 Harness profile 下的 cordis.patch.yml,在顶部加上:
- insert:
- id: suanzhang
name: suanzhang-dsh
重启 dsh web,刷新页面即可看到侧边栏余额和「算账」页签。
方式二:本地安装
把整个文件夹放到 Harness profile 的 node_modules 下:
# 在 DSH profile 目录(如 ~/.dsh/profiles/web)里执行:
cp -r /path/to/suanzhang-dsh node_modules/
然后同样在 cordis.patch.yml 里加上面的 insert 两行,重启即可。
隐私说明
| 动作 | 数据去哪 | 是否上传 |
|---|---|---|
| 查余额 | GET https://api.deepseek.com/user/balance(带你的 Key) |
只发给 DeepSeek 官方;Key 以只读方式用于这一次请求,不落地、不打印、不进日志、不进截图;任何返回前端的信息都会先剔除 Key |
| 抓官方价 | https://api-docs.deepseek.com 公开页面 |
无鉴权,只读 |
| 算费用/汇总 | 本地读取你的会话日志 | 不出本机 |
| 显示/排序/图表 | 浏览器本地计算 | 不出本机 |
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