DeepSeek Harness Plugin Hub

Publish and manage complete Harness Profiles. Discover Plugins for your next setup.

Explore

PluginsPresetsDocsNews

Community

Publish a pluginContactReport an issue

Resources

Plugin Hub on GitHubDeepSeek HarnessSystem statusPrivacy notice
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

Independent and unofficial. Not affiliated with, authorized by, or endorsed by DeepSeek.

Usage Stats — DSH Plugin for DeepSeek Harness
DeepSeek Harness Plugin Hub
ProfilesPluginsCategoriesNewsDocsSign inManage Profiles
ProfilesPluginsCategoriesNewsDocsSign in
← Plugins
U

@xfqz86/dsh-usage-stats

Usage Stats

DSH web plugin: token usage statistics in the sidebar footer — today badge (wide/rail) opening a detail panel with per-model/provider breakdown, session list, daily trend curve and heatmap (host scans session logs, serves usageStats Remote methods)

The plugin will be installed here. Keep web if you are unsure.

npx -y @deepseek-ai/dsh plugin --profile web add github:xfqz86/dsh-usage-stats#b124d1357da9bf3191942bda623dccc713c6f2c3
READMECompatibilityVersions

Compatibility and provenance

Usage Stats is published as @xfqz86/dsh-usage-stats and currently resolves to version 0.4.4. The Hub verifies its manifest and preserves the exact installation source for reproducible installs.

DSH compatibility
*
Runtime surfaces
web
Release source
github
Registry updated
9/20/2026

Versions

0.4.4stable
9/20/2026
0.4.3stable
9/17/2026
0.4.2stable
9/15/2026
Show 7 more versionsCollapse versions
0.4.1stable
9/13/2026
0.4.0stable
9/12/2026
0.3.0stable
9/11/2026
0.2.1stable
9/5/2026
0.2.0stable
9/2/2026
0.1.1stable
9/1/2026
0.1.0stable
8/26/2026

Related plugins

Loading related plugins…

Latest
0.4.4
DSH
*
HMR
Process restart
Tree shaking
Safe tree shaking not declared
Unpacked size
Unavailable
Files
Unavailable
Surface
web
License
MIT
Source
github
GitHub
★ 2
Weekly downloads
0
Last push
9/20/2026
View source ↗
README badge

Click the badge to copy Markdown for your README.

Do you maintain this Plugin?Claim benefit · Priority security scan

Verify the GitHub repository declared in package.json to manage this listing. After you claim it, Hub will prioritize a security scan of the current version and publish the result when it passes.

Claim this Plugin →
Report an issue

Related plugins

More verified plugins in models-usage.

Usage Stats@ychris12138/dsh-usage-statsToken usage heatmap, provider balances, and subscription quotas for the dsh web GUICodex Connectdsh-codex-connectChatGPT OAuth and Codex models for DeepSeek Harness.Ui Usage Billing@kenz1117/dsh-ui-usage-billingUsage billing dashboard for DeepSeek Harness: sidebar cost metrics plus a full dashboard modal, priced from a current multi-provider catalog with real usage aggregated from session logs.Codex Subscriptiondsh-codex-subscriptionUse ChatGPT and Codex subscriptions in DeepSeek Harness with OAuth, quota, safe resets, web search, images, and Fast mode

README

dsh-usage-stats — DSH 用量统计插件

DSH 的 Web 用量统计插件,按模型、会话、日期三个维度统计 token 用量与调用次数,挂载于侧边栏底部展示今日用量,点击打开详情面板。

功能

  • 侧边栏底部今日统计,宽列与 56px rail 自适应展示
  • 详情面板按概览、日期、会话、模型、设置组织
  • 模型统计重定向:在设置页配置「把某个供应商的某个模型的用量算到另一个供应商的某个模型名下」,模型页按规则归并展示(账本原始数据不变)
  • OpenCode Go 额度,展示滚动 5 小时、本周、本月三档剩余额度
  • DeepSeek 余额,展示多币种余额
  • Z.ai 额度,展示滚动 5 小时与本周百分比,以及每月 Web 搜索次数
  • 会话标题旁 session-id 徽标,悬停浮现复制按钮(设置页可关,默认开)

侧边栏底部
侧边栏底部

概览
概览
日期
日期
会话
会话
模型
模型
设置
设置

安装与卸载

本插件为标准 cordis 组合包,通过 profile 注入 web。

从 npm 安装

dsh plugin --profile web add @xfqz86/dsh-usage-stats

从 GitHub 安装

dsh plugin --profile web add github:xfqz86/dsh-usage-stats#release

从 tarball 安装

dsh plugin --profile web add https://github.com/xfqz86/dsh-usage-stats/releases/latest/download/xfqz86-dsh-usage-stats.tgz

固定地址,始终指向最新 Release 的 tarball。

本地开发

git clone https://github.com/xfqz86/dsh-usage-stats.git
cd dsh-usage-stats
pnpm install
pnpm build
dsh plugin --profile web add "link:$(pwd)"
# 后续改动后重新 pnpm build,浏览器刷新即可;服务端改动需重启 dsh

卸载

dsh plugin --profile web remove @xfqz86/dsh-usage-stats

设置

设置位于详情面板的设置 Tab,保存在 DSH 的配置文件 ~/.dsh/settings.yaml($DSH_HOME 改变时随之变化)的 usage-stats 段里,换浏览器、换设备登录同一台 DSH 都用同一份偏好。按 DeepSeek 余额、OpenCode Go 额度、Z.ai 额度、模型统计重定向、会话自上而下排列。

  • 启用 DeepSeek 余额监控与侧边栏展示,关闭监控则停止轮询,面板与侧边栏均不展示
  • 启用 OpenCode Go 额度监控与侧边栏展示,仅控制芯片,面板内详情仍可见
  • 启用 Z.ai 额度监控与侧边栏展示,逻辑同上
  • 各额度抓取间隔均为默认 5 分钟,下限 3 分钟
  • 会话标题旁显示会话 ID(默认开启,支持悬停复制),关闭后标题右侧不再挂徽标

配置文件里只写改过的字段,例如把 Go 额度抓取间隔改成 10 分钟:

usage-stats:
  goFetchMinutes: 10

旧版本把设置存在浏览器本地存储里,升级后首次打开会把旧设置自动写进配置文件,之后不再使用浏览器存储(服务端设置不可用时旧值会保留,不会丢)。

设置 Tab 底部为账本操作(清零与重建),需二次确认;扫描历史会话期间(面板顶部显示“扫描中…”)两项置灰不可点,等扫描结束自动恢复。

需展示额度时,在 DSH 凭据中心配置对应 Key:

  • OpenCode Go:OPENCODE_GO_API_KEY
  • DeepSeek:DEEPSEEK_API_KEY(兼容 DEEPSEEK_APIKEY、DEEPSEEK_API_TOKEN、DEEPSEEK_TOKEN)
  • Z.ai:ZAI_CODING_CN_API_KEY 或 ZAI_API_KEY(前者优先)

统计口径

  • 数据源为携带 data.usage 的记录:对话调用 assistant/message,压缩上下文的调用 compaction/summary
  • total = input + output + cacheRead + cacheWrite,reasoning 单列
  • 按模型维度取 provider 与 model(对话调用在 message.source,压缩调用在事件顶层),缺失记为 unknown
  • 按会话维度记录标题、工作目录、创建与最近活跃时间
  • 按本地自然日划分日期
  • 不含会话标题自动生成等辅助调用的用量:dsh 只记录这类调用的请求,不记录返回的用量

数据存储

账本位于 $DSH_HOME/storages/dsh-usage-stats/ledger.sqlite,SQLite 存储。首次启动自动扫描历史会话并导入,后续随事件实时增量更新,重启后可从账本恢复。

开发者

  • 工程规范见 AGENTS.md;架构、数据流与统计口径见 docs/ARCHITECTURE.md
  • 风格经验(lint 之外的统一约定)见 docs/STYLE.md
  • 接口协议见 docs/API.md
  • 模块结构见 docs/STRUCTURE.md,由 pnpm tree 生成
  • 发布流程见 .agents/skills/release/SKILL.md(发版技能,可直接加载执行)
  • 更新日志见 CHANGELOG.md,每次发版同步记录功能更新与 Bug 修复

License

MIT