AlfredChaos/dsh-usage-panel 预览 preview

AlfredChaos/dsh-usage-panel

Plugin插件 Native原生 ⭐ 9 MIT Usage & Cost用量与计费Data & Analysis数据与分析

DeepSeek Harness 消耗统计插件:设置页Token用量KPI、半年活跃热力图、按模型堆叠柱状图与模型环形图(dsh-plugin)

Project Overview项目介绍

dsh-usage-panel is a native plugin built exclusively for DeepSeek Harness (DSH). Once installed, it adds a dedicated Usage page under the Settings menu in DSH’s web GUI to display comprehensive token usage and analytics. You can install it directly from npm with the command dsh plugin --profile web add dsh-usage-panel, or pull it directly from the GitHub repository, or install from a local cloned checkout. No build step is required for any installation method, because prebuilt JavaScript files are already committed to the repository and included in the published npm package.

This plugin is for any DSH user who wants to track their token consumption, analyze model usage patterns, and export usage data for their own records. It displays cumulative all-time totals for input and output tokens, splits usage between main and subagent sessions, and calculates cache hit rate with separate read/write metrics. It also includes a six-month activity heatmap in GitHub’s contribution style, daily stacked bars for per-model usage that can be switched between 7, 14, and 30-day ranges, and a ranked list of the top 10 most token-heavy sessions.

The plugin aggregates existing persisted session logs incrementally using DSH’s built-in session projection mechanism, so it does not write any new data to your DSH instance and automatically includes data from all sessions created before the plugin was even installed. It uses UTC time for all daily buckets and exports, and handles edge cases like forked sessions to avoid double-counting usage that can skew your statistics. It is released under the open-source MIT license, and active development targets DeepSeek Harness 0.1.5-rc.1 with all tests run on Node.js’s built-in test runner.

dsh-usage-panel 是专为 DeepSeek Harness(DSH)开发的原生插件,安装后会在 DSH 网页端界面的「设置」菜单下新增「用量」页面,用来统计和展示 DSH 的令牌使用与模型调用相关数据。插件通过增量聚合已持久化存储的会话日志生成统计结果,全程只读不写入任何额外数据,不会对 DSH 原有的会话存储和运行逻辑造成任何影响。

该插件适合需要追踪自己 DSH 令牌用量、分析模型调用习惯的用户使用。它支持查看累计总用量、缓存命中率、近六个月的活动热力图、近一个月内各模型的日用量排行、用量最多的 10 个会话,还支持分供应商统计和全量数据导出功能。用户可以在页面悬浮查看各模块的详细明细,切换不同时间范围的统计结果。

该插件使用 MIT 许可证开源,安装方式十分简便,用户可以通过 npm 直接安装,也可以从 GitHub 拉取或本地安装,预编译产物已提交至仓库,不需要额外构建步骤。安装后重启 DSH 网页端即可在设置菜单看到入口,首次加载会自动扫描已有会话,后续默认每 10 分钟自动更新一次统计。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 9 stars - very few users, little community feedback星标只有 9,几乎没人在用,遇到问题缺少社区反馈
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-panel

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

READMEREADME

dsh-usage-panel

Token usage statistics for DeepSeek Harness, shown as a page under Settings → Usage in the web GUI. The plugin aggregates persisted session logs (incrementally, via the session-projection mechanism) and never writes anything back.

简体中文 · npm npm downloads CI dsh-plugin Mentioned in Awesome DeepSeek Harness

dsh-usage-panel v0.2 demo: loading, KPI count-up, heatmap entrance wipe, hover tooltips and range switching

What it shows

  • Cumulative totals (all time) — billed input / output tokens, main-session count (delegationDepth === 0, matching the visible session list exactly: zero-usage sessions count, archived ones do not; with the grand total of session records and the main/subagent usage split beneath it), and the most-used model with its share.
  • Cache hit rate — cache read ÷ (uncached input + cache read + cache write), with the read/write magnitudes.
  • Activity heatmap — the last six months in a GitHub-contribution layout (weeks as columns, weekdays as rows). Days are colored by quartile over non-zero usage.
  • Daily stacked bars — per-model token usage, switchable between the last 7, 14, or 30 days.
  • Top sessions — the 10 most token-hungry sessions with their folded titles, each tagged main or subagent by delegation depth.
  • Providers — per-provider token totals as horizontal bars (shown when more than one provider route is in use).
  • Model donut — all-time share per model, with the top 5 listed beside it; each row carries a per-model cache hit rate column, color-coded to its segment.
  • Export — full JSON, daily CSV and per-model CSV (formula-injection guarded, RFC 4180, UTF-8 BOM).

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-otel 下一个 Next dsh-web-mobile-fix →