Cassius0924/dsh-usage-dashboard 预览 preview

Cassius0924/dsh-usage-dashboard

Plugin插件 Native原生 ⭐ 10 MIT Usage & Cost用量与计费

DeepSeek 额度与用量仪表盘 — DSH(DeepSeek Harness)动态 Cordis 插件

Project Overview项目介绍

This is a native plugin built exclusively for DeepSeek Harness (DSH), extending the DSH web GUI with a full-featured usage and cost tracking dashboard. To install the plugin, users run the official DSH plugin command, with options to install from npm, GitHub, or a local checkout. After installation and a DSH restart, it adds two UI elements: a draggable, auto-anchoring floating quota widget in the bottom right corner, and a dedicated “Quota” tab in the top navigation bar. The widget shows core at-a-glance metrics like current balance and today’s consumption, and auto-refreshes every 60 seconds.

The plugin fills a gap in native DSH’s functionality, which only shows total cumulative consumption without breaking it down by time period, model, or other categories. It is targeted at regular DSH users who want clear visibility into how their DeepSeek API balance is being spent. It supports both Chinese and English, following DSH’s global language setting, and persists all user preferences like widget position and collapsed state across page refreshes. The dashboard includes multiple breakdown cards that show spending trends, model cost rankings, and the most expensive individual sessions for user debugging.

The plugin is released under the open-source MIT license, and requires users to have already configured their DeepSeek API key in DSH and have pnpm installed locally to complete installation. It has several known limitations: it only analyzes usage from local DSH session logs, and all cost values are estimates that do not account for official discounts or bonus credits, so official billing should be considered the source of truth. First run requires replaying all existing session logs, which takes approximately 5 seconds on a typical local machine, and the UI shows a skeleton loading screen during this process.

这是一款专为 DeepSeek Harness (DSH) 开发的原生插件,用于在 DSH 的 Web 图形界面中添加用量与费用统计面板。安装完成后,它会在界面右下角添加一个可拖动吸附的悬浮额度窗口,同时在顶部栏新增一个「额度」标签页。它提供了原生 DSH 不具备的详细费用信息,包括余额估算可用天数、今日/本月消耗量、各模型消费占比、缓存节省金额等核心数据。

它面向日常使用 DSH 调用 DeepSeek 大模型的用户,帮助解决原生 DSH 不展示分段、分类消费统计的问题。悬浮窗常驻界面不遮挡操作,默认每 60 秒自动刷新,余额低于预设预警线时会自动变色提醒。「额度」标签页整合了多维度的消费统计,所有数据估算逻辑和单价表完全公开,并非黑箱计算。

插件遵循 MIT 许可协议免费开源,使用标准 DSH 插件命令安装,要求用户已配置 DeepSeek API 密钥,且本地安装有 pnpm 包管理器。已知限制包括:仅统计本地 DSH 会话日志的用量,费用为估算值,不含官方折扣和赠金,以官方账单为准;首次加载需要重放全部会话日志,大约耗时 5 秒。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 note1 项提示
  • 10 stars - an early-stage project星标 10,属于早期项目
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 @cassius0924/dsh-usage-dashboard

把 Cassius0924/dsh-usage-dashboard 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-usage-dashboard

npm license

在 DSH(DeepSeek Harness)的 Web GUI 里,随时看得见 DeepSeek 的钱花在哪: 余额还能撑几天、今天花了多少、哪个模型最贵、缓存替你省了多少、钱里有多少来自图片,以及峰谷定价生效后把任务挪到闲时能省多少。

dsh-usage-dashboard

装上之后 GUI 里多两样东西:右下角一个可拖动的悬浮额度窗,顶部栏多一个**「额度」tab**。 界面支持中文与 English,直接跟随 DSH 全局的「Settings → Language」设置;切换无需刷新,选择由 DSH 持久化。


为什么需要它

用 DSH 跑 agent,钱是一点一点漏掉的,而 DSH 自己不会告诉你:

你真正想知道的 装之前
余额还能用几天? 只有一个余额数字
今天花了多少?这个月呢? 只有「累计」,没有时间感
钱花在哪个模型上? 不知道
缓存到底帮我省了多少? 完全看不到
钱里有多少来自图片? 多模态模型上线后更是看不见
高峰时段多付了多少? 只能自己算

这个插件把这些问题逐个翻译成一眼能看懂的数字。费用全部为估算,算法与单价公开可查(见费用是怎么算的)。


悬浮额度窗

悬浮额度窗

常驻右下角,不打断你干活:

  • 余额 + 今日消耗,一眼就够。
  • 可拖动,松手自动吸附四角;边界避开侧边栏、右侧详情面板、会话顶栏和输入框——不会挡住发送按钮。
  • 可收起成一行;显示/隐藏、所在角落、收起状态都会记住,刷新页面后原样回来。
  • 余额跌破预警线时,状态点和余额数字一起转成警示色。
  • 60 秒自动刷新余额。今日消耗读共享缓存,点 ↻ 同时刷新两者。
  • 插件加载时就把余额和用量预取到缓存里,所以打开「额度」tab 通常是秒开, 不用等那几秒的会话日志重放;预取失败不报错,交给各自挂载时再取。

「额度」仪表盘

余额:还能撑几天

账户余额与可用天数

「还剩多少钱」不解决余额焦虑,「还能用几天」才行。按近 7 个自然日(含没用的日子)的日均消耗折算,hover 能看到估算口径;不足 3 天转红。

今日 / 本月花了多少 —— 以及这个数怎么来的

消耗概览与计价说明

今日、本月、累计三个窗口,今日带「较昨日」、本月带「较上月同期」环比(上月同期而不是上月整月,免得月初总是显得便宜)。

展开计价说明能看到费用估算实际套用的单价表——估算不该是个黑箱。

高峰时段多付了多少

高峰 / 闲时分布

DeepSeek 从 2026-08-17 00:00 起改峰谷定价,高峰(北京时间 09:00–12:00、14:00–18:00)价格是闲时的两倍。

这张卡告诉你用量落在峰谷两侧的比例,以及如果高峰用量都挪到闲时能省多少——批量、可延后的任务放到闲时跑,同样的 token 只要一半的钱。

缓存替你省了多少

缓存命中与节省

前缀缓存的命中价只有未命中价的百分之一量级,是 DSH 这类高重复 prompt 负载上最大的省钱杠杆——上图这份用量实付 ¥14.64,缓存省下了 ¥458.15。

命中率掉到 60% 以下时,文案会换成怎么把它救回来的建议。

钱里有多少来自图片

截图待补拍:当前机器没有真实图片用量时,卡片显示的是空态,以下先以文字说明功能。

deepseek-v4-flash-vision-exp 上线后,图片按尺寸折算成 token 与文本一并计费,但「看了一堆截图」和「纯文本」在账单里长得一模一样。

这张卡重放会话日志时顺手数出图片:用户消息里的附件和 tool result 里的截图都会统计(不用读附件本体,日志里就有宽高)。每组数字给出图片张数、按官方换算规则估算的 token 与费用,以及占窗口输入 / 费用的比例,旁边是每天图片数的趋势和「图片最多的会话」排行——一个不停刷截图的循环会话,在这里一眼就能认出来。

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev dsh-host-rsi 下一个 Next dsh_session_folders →