yyb16yyb-hub/dsh-deepseek-usage
DeepSeek Harness 的实时 DeepSeek API 使用情况:余额、Token 统计、预估费用——Web UI 停靠栏 + 设置面板 + 模型工具。
Project Overview项目介绍
This is a native DeepSeek Harness plugin built exclusively for tracking DeepSeek API usage and costs. It pulls real-time balance data from DeepSeek’s official API, supports aggregating balances across multiple API keys, tracks token usage across different time windows, and calculates estimated costs based on peak and off-peak pricing for DeepSeek models. It can be installed directly via the DSH CLI with the command dsh plugin --profile web add github:yyb16yyb-hub/dsh-deepseek-usage. After installation, you will need to restart dsh web for the plugin to load correctly, as the client module table is only scanned at boot time.
Once loaded, the plugin adds a live stats dock under the conversation composer that updates automatically to show current balance and usage. Users can also navigate to the dedicated “DeepSeek usage” settings panel from the sidebar to view more detailed data, including daily usage heatmaps, 30-day usage bars, per-session usage breakdowns, and configurable pricing tables. You can also export all historical usage data as a CSV file for offline analysis if needed. The plugin also lets the DSH agent query balance and usage on demand via the deepseek_usage model tool. It is ideal for any DSH user that uses the DeepSeek API, especially those who want to keep close track of their API spending.
The plugin is released under the permissive MIT open source license. When installing for the first time from GitHub, users will need to add a build authorization entry to their pnpm-workspace.yaml file, because pnpm 10 and newer block build scripts for git-hosted dependencies by default. The plugin only tracks usage for DeepSeek API, and does not support other API providers. API keys never leave the host server and are never sent to the browser frontend, improving security for your credentials. Daily usage data is persisted to a local JSON file for long-term tracking and trend analysis across application restarts, and the UI adapts to both dark and light themes.
这是一款专为 DeepSeek Harness 开发的原生插件,核心功能是实时展示 DeepSeek API 的使用情况与费用消耗。它支持轮询 DeepSeek 官方接口获取账户余额、支持多 API 密钥的余额聚合、实时统计各类 Token 使用量,还可按模型的峰值/非峰值定价估算成本,同时提供了 Web UI 停靠栏和专用设置面板,可通过 DSH CLI 命令直接安装。
安装完成后重启 DSH Web 即可启用,用户可在对话编辑栏下方看到实时的余额和使用统计,也可进入侧边栏的设置面板查看详细的历史使用热力图、30天使用柱状图、按会话的使用统计,还支持导出 CSV 格式的历史数据。它适合所有使用 DeepSeek API 的 DSH 用户,尤其适合需要控制 API 成本、关注用量变化的开发者和普通用户。
该插件采用 MIT 许可证开源,首次通过 GitHub 安装时,需要在配置文件中添加构建授权才能完成安装,因为 pnpm 10 及以上版本默认禁止运行 Git 依赖的构建脚本。它仅支持追踪 DeepSeek API 的使用,不支持其他服务商,API 密钥始终保存在服务端,不会发送到前端浏览器,每日使用情况会持久化存储在本地文件中。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-deepseek-usage(yyb16yyb-hub/dsh-deepseek-usage)
仓库:https://github.com/yyb16yyb-hub/dsh-deepseek-usage
本站详情页:https://www.yhbd.top/plugins/yyb16yyb-hub-dsh-deepseek-usage/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证 MIT · ⭐ 2 · 最近提交 2026-08-16 · 主语言 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 更稳。
- Only 2 stars - very few users, little community feedback星标只有 2,几乎没人在用,遇到问题缺少社区反馈
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 github:yyb16yyb-hub/dsh-deepseek-usage
把 yyb16yyb-hub/dsh-deepseek-usage 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-deepseek-usage
English | 中文
A DeepSeek Harness plugin that shows real-time DeepSeek API usage.
- 💰 Account balance — polls the DeepSeek
/user/balanceendpoint (default every 30s): total / granted / topped-up balance and availability, with multi-key aggregation (apiKeys) - 📊 Usage stats — real-time request counts and tokens (input / output / cache-read / cache-write / reasoning) via the
llm/streamwaterfall, in three windows: total / today / last-60s, with the cache-hit rate - 💾 Persistent history — daily usage survives restarts (
~/.dsh/deepseek-usage/usage.json), powering the trend charts and CSV exports - 💸 Estimated cost — per-model pricing (built-in
deepseek-chat/deepseek-reasonertable, overridable via config), computed per window, with peak/off-peak pricing (offPeakHours/offPeakDiscount) - 🖥️ Web UI dock — a live stats line under the composer (
conversation.composer.dock), auto-refresh + manual refresh - ⚠️ Low-balance alerts — dock turns amber below the threshold (default 20) and red below threshold/5, with one browser notification per threshold crossing; optionally block LLM requests while below the threshold (
blockOnLowBalance) - 📋 Settings usage panel —
settings.sectionseat: balance card + per-key accounts, three-window usage, in-panel config editor (writes back through the host), history heatmap & 30-day bars, per-model pricing table, per-session usage table, and CSV exports - 🛠️ Model tool —
deepseek_usage, so the agent can query balance and usage on demand - ✅ Tests & CI — vitest unit tests and a GitHub Actions pipeline (typecheck + test + build)
Install
From GitHub (recommended)
dsh plugin --profile web add github:yyb16yyb-hub/dsh-deepseek-usage
⚠️ First install requires build authorization: pnpm ≥ 10 refuses to run prepare scripts of git-hosted dependencies (the plugin builds lib/ from source at install time). The first add fails with a hint — copy the exact package key pnpm prints into that profile's pnpm-workspace.yaml, then re-run:
allowBuilds:
dsh-deepseek-usage: true
Pin a commit for reproducible installs: dsh plugin --profile web add github:yyb16yyb-hub/dsh-deepseek-usage#<sha>.
Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →
MeteorNOX/DeepSeek-Balance-Whale-Widget
edison7009/EchoBird
Han-1413141/dsh-cost-meter
wssfk12138/dsh-damage-pulse
zh667/TokenLedger
edonadei/caliper
Ychris12138/dsh-usage-stats
Aisland-SJL/dsh-usage