yuye05/dsh-monitor
一个 Windows 桌面悬浮小窗:启动 Claude Code / dsh 时自动弹出,实时显示 DeepSeek 开放平台 和 智谱 GLM 平台 的官方用量(余额、今日消费、模型 Tokens、请求数)和本地缓存命中统计。
catalog descriptioncatalog 简介 / catalog description:Windows 桌面悬浮窗,实时显示 DeepSeek 官方用量(余额/今日消费/模型 Tokens/请求数)+ 本地缓存命中统计
Project Overview项目介绍
This is a Windows desktop floating window tool that tracks API usage and costs for DeepSeek and Zhipu GLM platforms, and it can be configured to automatically launch when you start DSH or Claude Code. It uses Playwright to scrape DeepSeek’s official website to get up-to-date official data including account balance, daily consumption, per-model token usage, and total request counts. It also parses local Claude Code session logs to generate 7-day cache hit statistics, and offers three different integration methods to add the auto-launch behavior to DSH or Claude Code’s startup process.
It is built for developers who use both DeepSeek and Zhipu GLM models for development work and are sensitive to API costs. The typical workflow after setup is that when you launch DSH or Claude Code, the floating window will pop up automatically, letting you see at a glance the current balance, daily or monthly consumption, and per-model token usage for both platforms. If you click anywhere outside the window, it collapses into a narrow top bar to save desktop space, and you can click the bar any time to expand it back to full view.
The project is open-sourced under the MIT license, so it is free to use and modify for any purpose. As a personal workflow tool, it has strict environment requirements: you must run Windows 10 or later, and have Python 3.10+, Node.js 18+, Microsoft Edge, and WebView2 runtime installed to run it correctly. On first run, you need to manually log in to DeepSeek (and optionally Zhipu GLM) to save the login session, and all sensitive credentials are excluded from the git repository by default.
这是一个运行在 Windows 系统上的桌面悬浮窗工具,专为监控 DeepSeek 和智谱 GLM 平台的 API 用量与花费开发,支持随 DSH 或 Claude Code 启动自动弹出。它通过 Playwright 抓取 DeepSeek 开放平台官网获取官方的余额、今日消费、模型 Token 用量和请求数数据,还能解析 Claude Code 本地会话日志生成缓存命中统计,提供三种自动触发方式集成到 DSH 或 Claude Code 启动流程。
适合需要同时使用 DeepSeek 和智谱 GLM 大模型做开发,对 API 成本敏感的开发者使用。典型工作流是:启动 DSH 或 Claude Code 后,悬浮窗自动弹出,你可以一眼看到两个平台的当前余额、当日/当月消费以及各模型的 Token 用量。点击窗口外部可将悬浮窗收缩为顶部窄条,需要查看时点击即可展开,不占用多余桌面空间。
本项目遵循 MIT 开源许可,是免费的个人工作流工具,深度绑定特定运行环境,使用前需要满足多项前提。要求系统为 Windows 10 以上,已安装 Python 3.10+、Node.js 18+、Microsoft Edge 和 WebView2 运行时,首次使用需要手动登录 DeepSeek 和(可选)智谱平台抓取会话,所有敏感信息不会上传到代码仓库。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-monitor(yuye05/dsh-monitor)
仓库:https://github.com/yuye05/dsh-monitor
本站详情页:https://www.yhbd.top/plugins/yuye05-dsh-monitor/
本站登记:类型 client · 归类 原生 DSH 插件 · 许可证 MIT · ⭐ 2 · 最近提交 2026-09-14 · 主语言 JavaScript · 未检测到 DSH 插件清单
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【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,几乎没人在用,遇到问题缺少社区反馈
- No DSH plugin manifest detected - it may only carry the dsh-plugin topic, so the install method must be confirmed on the spot未检测到 DSH 插件清单:可能只是打了 dsh-plugin 话题,安装方式要现场确认
- Desktop client: installation downloads an executable - verify the publisher and checksums桌面客户端:安装会下载可执行文件,请核对发布者与校验和
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:yuye05/dsh-monitor
把 yuye05/dsh-monitor 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
DeepSeek Monitor 悬浮窗
一个 Windows 桌面悬浮小窗:启动 Claude Code / dsh 时自动弹出,实时显示 DeepSeek 开放平台 和 智谱 GLM 平台 的官方用量(余额、今日消费、模型 Tokens、请求数)和本地缓存命中统计。
数据以官网为准(Playwright 抓 platform.deepseek.com/usage),本地日志只做模型分解与 7 天图表,避免"本地统计 ≠ 官方"的偏差。GLM 部分官网只能提供余额与月消费(智谱官网无 per-model token 明细),token 用量走本地 jsonl。

⚠️ 定位说明:这是个人工作流工具,不是通用产品——它深度绑定作者自己的环境。clone 前请先确认以下前提都满足,否则核心功能(官方数据)起不来:
- Windows 10+(依赖系统 WebView2 运行时与已装的 Edge)
- 使用 Claude Code 且会话日志落在
~/.claude/projects/*/*.jsonl(本地命中率/7 天图全靠它;不用 Claude Code 的话这些板块显示空)- 有 DeepSeek 开放平台账号,且愿意手动登录一次抓取会话(
node fetch_official.js --login)- (可选,显示 GLM 需) 有 智谱开放平台账号,且愿意登录一次(
node fetch_glm.js --login)- 本机可运行 @playwright/test(
npm install或全局安装)
创作缘由
DeepSeek V4 系列在 2026-08-17 起大幅涨价并改为峰谷定价——高峰时段费用直接翻倍,跑模型的成本一下子敏感起来。涨价之后,"得盯着点花费"就成了日常。但每次想看余额和用量,都得打开浏览器登录官方平台翻页面——重复几次就烦了。
后来又把 智谱 GLM-5.3-Flash 接入模型池(编码/agent 强、原生多模态、便宜),于是这个悬浮窗也一并把 两个平台 的余额和用量收进来,启动即见,随时知道钱花在哪儿。
功能
- 🪟 无边框置顶小窗,贴屏幕右上角;拖动顶部空白/标题栏即可移动(
.drag-zone拖拽区,按钮在兄弟节点不被拖拽劫持) - 📁 点击外部自动收起:点浮窗之外 → 收成顶部一根 40px 居中窄条(纯色背景、隐藏按钮,仅 logo + 标题 + ▾);点击窄条 → 一键展开回完整界面(不悬停自动展开)
- 💰 官方余额 / 当日消耗 / 今日 Tokens(DeepSeek)
- 🔥 智谱 GLM 余额 + 本月消费(GLM 卡片下方独立条)
- ⚡ 三模型卡片:V4.1 Flash / V4 Pro / GLM-5.3 Flash(DeepSeek 走官网,GLM 走本地 jsonl)
- 📊 最近 7 天缓存命中明细柱状图
- 🔄 手动刷新(每次约 8s,headless Edge 抓官网)
- 🎨 深色「能源仪表舱」主题(可切浅色):深墨底 + 暖金弧环余额表 + 冷青缓存命中 + 等宽数字;标题栏主题按钮深浅切换并记忆(localStorage)
- 📀 余额弧环:余额外的 260° 弧环 = 今日消耗占预算比例(阈值来自 config 的
today_cost_alert_threshold),越阈值转红
环境要求
| 依赖 | 版本 | 说明 |
|---|---|---|
| Python | 3.10+ | pip install -r requirements.txt(pywebview) |
| Node.js | 18+ | 官网抓取器用 Playwright |
| Windows 10+ | — | pywebview 依赖系统 WebView2 运行时 |
| Microsoft Edge | 已装 | 抓取复用系统 Edge(channel: msedge) |
安装
# 1. Python 依赖
pip install -r requirements.txt
# 2. Node 依赖(官网抓取器)
npm install # 安装 @playwright/test
# 3. 配置文件
cp config.example.json config.json
# 编辑 config.json,填入你的三条路径:
# node_path npm 全局 node_modules(@playwright/test 所在)
# credentials_file DeepSeek API key 文件
# claude_projects Claude Code 会话 jsonl 目录
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
LaoYueHanNi/dsh-token-usage
lanlandeli/dsh-usage-stats
Shiye-10Pages/dsh-whale-meter