实时查看 API 余额与服务状态,可拖拽停靠
28.6/100
综合分
1
GitHub 星标
—
npm 周下载
—/5
用户评分
数据截至 2026/10/1 · 周下载取自 npm 全网(含 CI / 镜像),非本站安装数;综合分由星标、活跃度与兼容性检查合成。
安装命令 · 需先装 dsh CLI 引擎
dsh plugin --profile web add namesColin/DSH-Plugin-Account-HUD该包不可直接 npm 安装,改从 GitHub 源安装(明细见下方安装检查)
状态速览
判定依据:实装验证 · 静态安装检查 · 自动扫描 · 仓库维护状态信任档位:需留意
是什么
dsh 原生插件 · model
安全吗
本站尚未对该插件做风险分级
暂未覆盖,不等同于无风险
还在维护吗
更新放缓:最近一次提交在 51 天前
档位由哪些信号合成
本站实装验证(真实安装 L4 覆盖全站;L5 为运行时冒烟或实机截图,覆盖范围小于 L4) · 验证所用 dsh 版本 · 静态安装检查 · 风险分级 · 仓库维护状态。 下方各区块是它的证据明细。
⚠︎ 实装验证未通过(unknown · 2026/10/2) ——可能是验证环境差异,装前建议到 GitHub 仓库确认最近更新与 issue。
社区实装还没有人打卡 · 装过的第一个就是你
安全扫描自动 · 静态分析源码v2.7.0🟢 扫描:未发现敏感能力尚无人工评估展开查看扫描说明与证据 ↓
安全扫描自动 · 静态分析源码
v2.7.0静态扫描未发现敏感能力:最多只发网络请求、读取自身元数据或只读文件,未发现执行命令、文件写入或敏感信息读取。
发起外部网络请求
查看扫描证据(共 2 处,展示前 2 条)
- 发起网络请求src/index.ts:121
const resp = await fetch(BALANCE_URL, { - 发起网络请求src/index.ts:149
const resp = await fetch(STATUS_URL, { signal: ctrl.signal })
扫描于 2026/11/1(0 天前) · 范围 入口闭包 + 发布文件清单 · 来源 GitHub 仓库
静态扫描只反映源码中出现的调用,不构成安全背书;人工评估与自动扫描相互独立、互不覆盖。
依赖的 DSH / Cordis 模块
@deepseek-ai/cordis@deepseek-ai/dsh-client-locale@deepseek-ai/dsh-client-runtime@deepseek-ai/dsh-client-ui-slots@deepseek-ai/dsh-client-web-react@deepseek-ai/dsh-host-webserver@deepseek-ai/dsh-credentials给这个插件打分还没有人投票↓
用户评分
还没有人投票,来当第一个
功能亮点
- 实时显示API余额
- 查看API服务状态
- 可拖拽停靠
展开完整介绍(134 字)↓
一个deepseek harness的插件,用于实时显示api-key的余额和api服务状态。昨天dsh发布后高强度使用,发现这个功能对我这种余额敏感开发者很重要,遂开发之,后续必然有更多更好的插件涌现出来,我谨以此项目权作抛砖引玉,开源出来,也供后续我自己回看之用。
README
由 DeepSeek 最新模型翻译生成dsh-account-hud
DeepSeek 账户信息悬浮面板插件 / DeepSeek Account HUD Plugin
一个可停靠、可拖动的悬浮小部件,显示你的 DeepSeek API 余额与服务状态;若安装了 dsh-better-sidebar,还会在侧边栏注册一个「账户」Tab。
A dockable/draggable floating widget showing your DeepSeek API balance and service status; registers an "Account" tab in dsh-better-sidebar when installed.
适配 / Adapter
DeepSeek Harness v0.1
功能 / Features
- 💰 余额显示(官方 GET /user/balance 接口,服务端代理,API key 不进浏览器)/ Balance via the official API (server-side proxy - your key never reaches the browser)
- 📡 服务状态(https://status.deepseek.com/feed.rss,60s 轮询)/ Service status with 60s polling
展开完整文档(README 剩余 1 节)
dsh-account-hud
DeepSeek 账户信息悬浮面板插件 / DeepSeek Account HUD Plugin
一个可停靠、可拖动的悬浮小部件,显示你的 DeepSeek API 余额与服务状态;若安装了 dsh-better-sidebar,还会在侧边栏注册一个「账户」Tab。
A dockable/draggable floating widget showing your DeepSeek API balance and service status; registers an "Account" tab in dsh-better-sidebar when installed.
适配 / Adapter
DeepSeek Harness v0.1
功能 / Features
- 💰 余额显示(官方 GET /user/balance 接口,服务端代理,API key 不进浏览器)/ Balance via the official API (server-side proxy - your key never reaches the browser)
- 📡 服务状态(https://status.deepseek.com/feed.rss,60s 轮询)/ Service status with 60s polling
- 📌 常驻顶栏:默认停靠在会话顶栏(【PTC 模式】旁),悬停展开详情 / Docks in the session header by default, hover to expand
- 🖱️ 自由拖拽:拖出顶栏即变成浮动窗(跟手),拖回顶部吸附 / Drag out to float, drag back to re-dock
- 🌏 中英双语界面(跟随 DSH 语言设置)/ Bilingual zh/en UI (follows the DSH locale)
📦 安装 / Install(npm 方式,推荐 / recommended)
已发布到 npm,一条命令安装(/ Published on npm, one command):
dsh plugin --profile web add dsh-account-hud
重启 DSH(/ Then restart DSH):
dsh web
如果你是用源码 checkout 跑 DSH:/ If you run DSH from a source checkout:
pnpm dsh web
打开 DSH Web UI 并硬刷新(/ Open the UI and hard-refresh)Ctrl+Shift+R,顶栏会出现余额胶囊。
版本兼容性 / Compatibility
| DSH 版本 / DSH version | 状态 / Status |
| 0.1.5-rc.1+ | ✅ 已验证(类型检查 + 构建 + 运行)/ verified |
| 0.1.0-rc.5 | ✅ 支持(初版开发环境)/ supported |
DSH 0.1.5 把 agent preset id code 重命名为 ptc。本插件不依赖 preset id,因此不受影响;但如果你的 ~/.dsh/settings.yaml 里 agent-presets.default 仍是 code,新建会话会报 preset "code" not found,改成 ptc 或 standard 即可。
Note: DSH 0.1.5 renamed the agent preset id code to ptc. This plugin does not depend on preset ids; if your ~/.dsh/settings.yaml still has agent-presets.default: code, new sessions fail with preset "code" not found - change it to ptc or standard.
环境要求 / Requirements
安装前请确认以下环境(/ Before installing, make sure you have):
| 依赖 / Requirement | 检查方式 / How to check | 安装方法 / How to install |
| DeepSeek Harness (DSH) 已安装且可用 / installed and working | dsh --version 输出版本号(兼容 0.1.0-rc.5 与 0.1.5-rc.1+)/ prints a version (works with 0.1.0-rc.5 and 0.1.5-rc.1+) | 见 DSH 官方文档 |
| DeepSeek API Key(可选,仅余额功能需要 / optional, only needed for balance) | https://platform.deepseek.com | 见下方「配置 API Key」 |
如果 dsh --version 报错,说明 dsh 命令不在 PATH:可全局安装 npm i -g @deepseek-ai/dsh,或把下文所有 dsh 替换为 npx -y --package @deepseek-ai/dsh dsh。
If dsh --version fails, install the CLI globally or replace every dsh below with npx -y --package @deepseek-ai/dsh dsh.
配置 API Key / Configure the API key
余额功能需要 DeepSeek API Key。DSH 从凭据系统读取——可在 DSH Web UI 的设置页配置,或在启动 DSH 的环境里导出(/ Set it in the DSH UI, or export it in the launching environment):
export DEEPSEEK_API_KEY=sk-your-key
没有 key 时,余额区域显示「未配置 API Key」,服务状态仍正常显示。
使用说明
- 📌 停靠顶栏:启动后默认出现在会话顶栏(【PTC 模式】标签旁),显示 CNY 余额 + 状态点 + 最新状态 + ▼(▼ 表示还有更多状态)
- 🖱️ 悬停展开:鼠标放在胶囊上(不点击)即弹出完整详情面板(余额/统计/服务状态时间线),移开自动收起
- 🖱️ 拖出浮动:按住胶囊往下拖——拖动中的就是浮动窗本体(跟手移动)——松手即停在松手位置,且默认展开
- 📌 拖回吸附:把浮动窗拖回页面顶部 40px 带内,出现蓝色虚线停靠槽,松手即吸回顶栏
- 🔄 数据实时刷新:余额/状态每次请求都从官方 API 实时获取,前端 60s 轮询
- 🔌 装有 better-sidebar 时,侧边栏「+」菜单多一个「账户」Tab;未装则仅停靠/浮动窗
后端路由(参考)
| 路由 | 用途 |
| GET /api/account-hud/balance | 实时余额(每次请求实时获取) |
| GET /api/account-hud/status | 实时服务状态 |
卸载
dsh plugin --profile web remove dsh-account-hud
然后重启 DSH。
故障排查
| 现象 | 可能原因 | 解决 |
| dsh plugin 报 pnpm store 警告 | 全局 pnpm 版本与 profile 的不一致 | npm i -g pnpm@11 后重试 |
| 显示「未配置 API Key」 | 未设置 key | 配置 DEEPSEEK_API_KEY(见上文) |
| 安装后顶栏无胶囊 | DSH 未重启或浏览器缓存 | 重启 DSH + 硬刷新(Ctrl+Shift+R) |
| 报 "Failed to load plugins" 且提到 dsh-account-hud | 安装的包损坏 | dsh plugin --profile web remove dsh-account-hud 后重新安装 |
从源码开发
git clone git@github.com:namesColin/DSH-Plugin-Account-HUD.git
cd DSH-Plugin-Account-HUD
npm install
npm run build # 类型声明(tsc)+ JS bundle(tsdown)
dsh plugin --profile web add . # 本地安装
发布新版本:
npm run build
npm version patch # 0.1.0 -> 0.1.1
npm publish # 需 npm 登录;2FA 时加 --otp=
架构: 后端(src/index.ts)在 DSH 的 web server 上注册 API 路由,通过凭据服务读取 key;前端(src/client/index.tsx)用 document.body + createRoot 挂载 HUD(与 better-sidebar 同策略),跟随 DSH i18n 系统,并通过 ctx.get('betterSidebar') 可选注册侧边栏 Tab(解耦:装不装 better-sidebar 都能用)。
架构: 后端(src/index.ts)在 DSH 的 web server 上注册 API 路由,通过凭据服务读取 key;前端(src/client/index.tsx)用 document.body + createRoot 挂载 HUD(与 better-sidebar 同策略),跟随 DSH i18n 系统,并通过 ctx.get('betterSidebar') 可选注册侧边栏 Tab(解耦:装不装 better-sidebar 都能用)。
问题反馈
使用中遇到任何问题、bug 或改进建议,欢迎提 Issue:
- 🐛 Bug / 问题:https://github.com/namesColin/DSH-Plugin-Account-HUD/issues
- 💡 功能建议:同样通过上面的 Issues 页面
- 📝 反馈时请包含:
- DSH 版本(dsh --version)
- 插件版本(npm view dsh-account-hud version)
- 复现步骤或截图
- 浏览器控制台报错(如有)
本项目由 AI 辅助开发,部分细节可能不完善;你的反馈是改进的最大动力。
许可证
本项目使用 GNU Affero General Public License v3.0 (AGPL-3.0) 授权。
- 你可以自由 fork、修改、分发
- 修改后的分发版本必须同样以 AGPL-3.0 开源
- 完整协议文本见 LICENSE
GNU AGPL-3.0 简介预览分享卡片长什么样 ↓
分享 · DeepSeek Harness Hub
namesColin/DSH-Plugin-Account-HUD
实时查看 API 余额与服务状态,可拖拽停靠
相关插件 · 模型接入
API 中继安全审计toby-bridges/api-relay-audit
面向 AI API 中转与 LLM 代理的本地安全审计。
★ 897已汉化DSH
69.4
免费搜索插件DDDMUC/dsh-free-search
DeepSeek Harness 免费搜索插件 —— 无需 API key,零成本,多引擎可切换。 一个给…
★ 761已汉化DSH
68.7
免费联网搜索liustack/modsearch
在官方 App 里模型能联网,切到 API 就不能了。ModSearch 把联网补回来:网页搜索、X…
★ 863已汉化DSH
68.5
OpenCode 免费模型FishBottle7/opencode2dsh
在 DSHDeepSeek Harness里原生使用 OpenCode Zen 的免费匿名模型。
★ 379已汉化DSH
67.8
AI 模型网关tingly-dev/tingly-box
Tingly Box Web UI 演示
★ 373已汉化DSH
67.4
WorkBuddy 账号池XDTrees/dsh-xdpool
把你能白嫖的模型额度接进 DSH 同一个池:WorkBuddy 多账号自动容错、十三家扫码登录、76…
★ 359已汉化DSH
67.1