CZ1900/suanzhang-dsh 预览 preview

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,公司网络建议改用本地复制方式。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • 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)里装一个「算账」小助手:你的余额、今天花了多少、每一步模型调用花了多少钱——全部清清楚楚,不用再猜。

English


为什么要装它?

用 DeepSeek 的时候,你是不是经常想知道:

  • 我的余额还有多少? —— 想查还得去网页翻,麻烦。
  • 今天到底花了多少钱? —— 用完没感觉,月底才心疼。
  • 这一步操作花了我多少钱? —— 表格里只有 token 数,换成人民币才直观。
  • 钱都花在哪了? —— 哪个模型最烧钱?哪个工具最费钱?

装上「算账」,这些答案开机就在眼前:

你关心的 算账给你
余额还剩多少 侧边栏常驻显示,刷新/自动更新
今天花了多少 同样在侧边栏,一眼看到
每一步花了多少人民币 「算账」页签按步骤列出费用
钱花在哪了 按模型、按工具、按天、按会话(成本≈交付物)全部可视化
再聊下去要花多少 成本预测:平均每步 × 步数

长什么样?

简洁的交易终端风格(类似 Bloomberg 行情界面):

  • 侧边栏底部:当前余额:¥xx.xx,今天用了:¥xx.xx,点一下直接跳进算账页。
  • 算账页签:顶部四格行情栏(余额 / 今天用了 / 累计 / 缓存节省)→ 下方一步步的费用明细表。
  • 点击任意步骤行:自动跳到「轨迹」页签并高亮那一步,想看细节不用翻。
  • 官方价自动同步:计价跟着 DeepSeek 官方页走,官方调价自动生效,不用手动改。

界面预览

suanzhang 界面预览

侧边栏余额 & 今日消费 · 算账页签行情栏 + 步骤费用表 · 分析区条形图 + 成本预测

装它要什么?

  • 一台装了 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 →

← 上一个 Prev zotero-wave-rag 下一个 Next dsh-policy-drift-proof →