Ychris12138/dsh-usage-stats 预览 preview

Ychris12138/dsh-usage-stats

DeepSeek Harness Web GUI(dsh web)的提供商余额、订阅配额和令牌使用分析。

Project Overview项目介绍

This is a native plugin built exclusively for the web profile of DeepSeek Harness (DSH). It provides multi-provider account balance tracking, subscription quota monitoring, and token usage analytics for DSH users. To install the stable version via the official DSH CLI, run the command dsh plugin --profile web add "@ychris12138/dsh-usage-stats@0.3.3". After installation, you need to restart the running dsh web process and hard refresh your browser to see the new entry in the sidebar. It is also available for GUI installation via the DSH Community Market, and you can use a compatible npx installer if the official DSH plugin command is unavailable.

This plugin is intended for DSH users who manage multiple LLM provider accounts and want to keep track of their token consumption and spending. After installation, the plugin automatically detects all configured provider accounts in your DSH setup and refreshes balance and usage data in the background on a configurable schedule. You can open the analytics panel from the sidebar entry to view daily and monthly cumulative usage, cache hit rate, cost breakdowns by date and model, set up budget alerts, and export usage data as CSV or JSON for further offline analysis.

The plugin requires DSH version 0.1.0-rc.6 or newer, and only works with DSH's web profile. All data processing happens locally on your machine, and no account credentials are sent to third parties; only loopback requests can access the plugin's API endpoints to ensure security. It is released under the permissive MIT open source license, which allows free use and modification. When first installing, avoid using both the official CLI install method and the compatible npx install method at the same time, as this can cause common duplicate plugin mounting errors.

这是一个专为 DeepSeek Harness(DSH)网页端开发的原生插件,核心功能是监测多供应商大模型账户余额、订阅配额,并提供 Token 使用量统计与费用分析。插件支持通过 DSH 官方 CLI 命令行安装,也兼容 DSH 社区插件市场的图形化安装流程,安装后需重启 DSH web 服务并刷新浏览器侧边栏,即可看到入口。它适配多种主流大模型供应商接口,提供统一账户展示、用量下钻分析等能力。

该插件面向使用 DSH 管理多个大模型供应商账户的开发者,帮助他们清晰掌握 Token 消耗情况与费用支出。安装插件后,插件会自动发现已配置的供应商账户,定期在后台刷新余额与用量数据,用户可从侧边栏入口打开分析面板,查看日/月累计用量、缓存命中率、按日期或模型分类的费用明细,还可设置预算预警,也能导出 CSV 或 JSON 格式的用量数据做进一步分析。

本插件要求 DSH 版本不低于 0.1.0-rc.6,仅支持 DSH 的 web profile。所有数据处理都在用户本地完成,不会向第三方发送账户凭据,仅回环请求可访问插件 API,安全性有保障。插件采用 MIT 开源许可证,完全免费使用,初次使用时需要注意,如果通过兼容安装器安装,不要同时保留 CLI 安装和兼容安装两种配置,避免重复挂载插件导致异常。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 no risk signal found未发现风险信号
  • This site's static screen found no obvious risk signal (stars, license, activity, manifest)本站静态筛查没发现明显风险信号(星标、许可证、更新活跃度、清单完整度)
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 "@ychris12138/dsh-usage-stats@0.3.5"

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

READMEREADME

dsh-usage-stats

GitHub Release CI License

为 DeepSeek Harness 网页端提供多供应商账户监测与 Token 用量分析。

Provider balances, subscription quotas, and token-usage analytics for the DeepSeek Harness Web GUI (dsh web).

dsh-usage-stats interface preview

展示图使用脱敏演示数据;插件不会把 API Key、Cookie、管理 PAT 或上游原始响应发送到浏览器。

Powered by OrcaRouter

🐋 OrcaRouter sponsors this project and is available as an optional OpenAI-compatible provider. Learn more · Referral link.

一眼看懂 / At a glance

能力 说明
💳 统一账户卡片 API 供应商显示余额,Token Plan 显示分窗口额度;面板一次只呈现当前供应商
📊 Token 用量分析 今日、本月、累计、缓存命中率、月历热图,以及按日期/供应商/模型下钻
💰 估算费用与预算 按事件时间匹配历史价格,提供日/月费用、session 级聚合及可选预算预警
🔄 后台监测 账户按 active/detail/background 自适应刷新;间隔可配置或完全关闭,本地 Token 聚合保持独立运行
🧩 可扩展适配器 支持 New API、Sub2API、通用余额模板,以及声明式 JSON Pointer 自定义查询
📦 安全导出 提供 daily/session CSV 与版本化 JSON;Unicode、CSV 公式前缀和不完整费用均安全处理
🔒 本机安全边界 数据端点仅接受回环 GET;OrcaRouter preset 仅由带防跨站请求头的显式回环 POST 写入;凭据只在服务端解析

界面支持中文和英文。浏览器只请求当前选择的 provider;账户自动刷新由服务端统一调度。手动刷新会更新用量、供应商列表,并强制刷新当前账户,不会批量强制请求其他供应商。

快速安装 / Quick start

需要 DeepSeek Harness web profile(基础功能支持 @deepseek-ai/dsh >= 0.1.0-rc.6)。DSH Desktop 的 DeepSeek Account 登录余额接入依赖 DSH 0.2.0-rc.2+ 提供的 Host account service;旧版 Harness 仍继续使用 API Key 余额路径。

稳定版优先安装 npm 上的精确版本;这也是 DSH Desktop Market 使用的同一个包:

dsh plugin --profile web add "@ychris12138/dsh-usage-stats@0.3.5"

只有测试尚未发布的 source/RC 时才使用 dsh plugin --profile web add "github:Ychris12138/dsh-usage-stats"。GitHub main 可能领先 npm stable,不应把 source 安装当作市场安装验收。

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-lowtide 下一个 Next dsh-android →