lanlandeli/dsh-usage-stats
DeepSeek Harness 使用统计插件|Token 总量与构成、7/30 天趋势、年度活跃热力图、模型占比、工作区/任务筛选、CSV/JSON 导出
Project Overview项目介绍
This is a lightweight native usage statistics plugin built specifically for the DeepSeek Harness (DSH) Web UI. It tracks and visualizes your token usage across all your DeepSeek Harness sessions, with features that show total token count, daily usage trends, active dates, and distribution across different models. You can install it directly via the DSH CLI with the command dsh plugin --profile web add dsh-usage-stats, and it integrates via DSH’s official extension API without modifying core DSH files or official npm packages. All usage data is stored locally on your machine, so you don’t have to worry about data being sent to external third-party servers.
After installing the plugin and restarting your DSH Web Profile, a new "Usage Stats" entry will appear above the Settings option in your DSH sidebar. The plugin includes multiple useful modules: an overview dashboard, daily trend charts, an activity heatmap for the past year, a detailed call log with filtering, and data export tools. You can filter your statistics by workspace, main task, or sub-task to narrow down your usage, and export data as CSV or JSON for offline archiving or custom analysis. This plugin is ideal for DSH users who want to track their token consumption and manage usage costs effectively.
The plugin requires Node.js version 22.19 or newer, and has been tested to work with DSH version 0.1.0-rc.6 for both the web UI and desktop builds that ship with the web UI. It automatically adapts to your DSH theme (light or dark) and language setting (Chinese or English), so it fits seamlessly into your existing DSH workflow and setup. It is released under the open source MIT license, and does not store any sensitive user data like prompt text, API keys, or response content, keeping your usage data private and secure.
dsh-usage-stats 是专为 DeepSeek Harness Web UI 开发的原生轻量使用统计插件,核心功能是集中展示用户的令牌使用总量、每日使用趋势、活跃日期分布和不同模型的使用占比。它通过 Harness 官方扩展接口集成,不会修改官方 Web UI 或 npm 包,所有统计数据都保存在用户本地。
安装完成后重启 Web 配置文件,就能在侧边栏「设置」选项上方找到「使用统计」入口。用户可以通过工作区、主任务或子任务筛选统计范围,也支持将统计数据导出为 CSV 或 JSON 文件,方便归档和进一步分析。适合需要跟踪令牌使用情况、管控使用成本的 DeepSeek Harness 用户使用。
该插件要求 Node.js 版本不低于 22.19,已经在 DeepSeek Harness 0.1.0-rc.6 版本完成测试,支持浅色和深色主题,自动适配 Harness 的语言设置。它采用 MIT 许可证开源,不存储用户提示词、API 密钥等敏感信息,保障用户隐私安全。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-usage-stats(lanlandeli/dsh-usage-stats)
仓库:https://github.com/lanlandeli/dsh-usage-stats
本站详情页:https://www.yhbd.top/plugins/lanlandeli-dsh-usage-stats/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证 NOASSERTION · ⭐ 11 · 最近提交 2026-08-17 · 主语言 TypeScript
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【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 更稳。
- 11 stars - an early-stage project星标 11,属于早期项目
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 dsh-usage-stats
把 lanlandeli/dsh-usage-stats 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
📊 dsh-usage-stats
DeepSeek Harness Token 使用情况,一目了然。
dsh-usage-stats 是面向 DeepSeek Harness Web UI 的轻量使用统计插件,用于集中展示 Token 总量、每日趋势、活跃日期及模型分布。
插件通过 Harness 提供的扩展接口集成,不修改 Web UI 或官方 npm 包。统计数据保存在本机。
dsh plugin --profile web add dsh-usage-stats
重启 Web Profile 后,侧边栏「设置」上方会出现 使用统计。
更新或卸载:
dsh plugin --profile web update dsh-usage-stats
dsh plugin --profile web remove dsh-usage-stats
🎬 效果演示

🖼️ 界面截图
查看浅色主题

查看深色主题

✨ 功能概览
| 模块 | 说明 |
|---|---|
| 📈 使用概览 | 展示 Token、会话、消息、活跃天数、连续使用天数及最常用模型的历史累计值 |
| 📊 每日趋势 | 展示最近 7 天或 30 天的 Token 变化,悬停可查看指定日期的模型用量 |
| 🔥 活跃热力图 | 以颜色深度表示一年内各日期的 Token 用量,悬停可查看 Token 数量及调用轮次 |
| 🎯 范围筛选 | 支持按工作区、主任务或子任务限定统计范围 |
| 📋 调用明细 | 查看单次调用的耗时、Token、缓存率、模型与思考程度,支持筛选与分页 |
| 💾 数据导出 | 支持导出 CSV 或 JSON,用于归档或进一步分析 |
| 🌐 中英文界面 | 自动跟随 Harness 的语言设置切换中文或英文 |
| 🎨 主题适配 | 自动跟随 Harness 的浅色或深色主题 |
| ⚡ 轻量运行 | 无第三方图表库、无后台轮询,减少额外的网络请求与运行开销 |
✅ 已修复
官方模块重复安装风险
0.1.16 将插件使用的 DeepSeek Harness 官方模块统一声明为对等依赖,避免 Profile 内出现插件私有副本及模块身份分裂。发布检查会阻止官方模块再次进入普通依赖。
子任务继承上下文重复计入
0.1.13 修复了 fork 子任务将父会话继承上下文重复计入自身用量的问题。子任务现在只统计自身产生的调用;升级后,旧版统计缓存会自动失效并按新口径重建。
⚙️ 配置
config:
indexConcurrency: 2
cacheWriteDelayMs: 1000
apiPath: /usage-stats/v1
Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →
wssfk12138/dsh-damage-pulse
Ychris12138/dsh-usage-stats
JingbiaoMei/Tokdash
yxxbc/dsh-balance-plugin
feiyang-dev/dsh-usage-plugin
zhu168/dsh-save-money
Make0209/dsh-usage-stats