🎁 福利专区全网大模型免费应用 + 新用户福利 + 注册活动入口,低成本玩转 AI

API 余额显示 anonRTtty/dsh-api-balance-displayer-plugin

DeepSeek Harness
anonRTtty70 天前有提交已提供中文文档扫描:未发现敏感能力

在上边栏实时查看 DeepSeek API 剩余余额

28.2/100
综合分
1
GitHub 星标
—
npm 周下载
—/5
用户评分

数据截至 2026/9/19 · 周下载取自 npm 全网(含 CI / 镜像),非本站安装数;综合分由星标、活跃度与兼容性检查合成。

安装命令 · 需先装 dsh CLI 引擎
dsh plugin --profile web add anonRTtty/dsh-api-balance-displayer-plugin
该包不可直接 npm 安装,改从 GitHub 源安装(明细见下方安装检查)

状态速览

判定依据:实装验证 · 静态安装检查 · 自动扫描 · 仓库维护状态
信任档位:已验证
是什么
dsh 原生插件 · model
装得上吗
本站已真实安装成功
非静态推断
L4 · 真实安装等级说明 →
安全吗
本站尚未对该插件做风险分级
暂未覆盖,不等同于无风险
还在维护吗
更新放缓:最近一次提交在 70 天前
档位由哪些信号合成

本站实装验证(真实安装 L4 覆盖全站;L5 为运行时冒烟或实机截图,覆盖范围小于 L4) · 验证所用 dsh 版本 · 静态安装检查 · 风险分级 · 仓库维护状态。 下方各区块是它的证据明细。

验证判据与等级说明 →
社区实装还没有人打卡 · 装过的第一个就是你
安全扫描自动 · 静态分析源码
v2.7.0
🟢 扫描:未发现敏感能力尚无人工评估
展开查看扫描说明与证据 ↓

静态扫描未发现敏感能力:最多只发网络请求、读取自身元数据或只读文件,未发现执行命令、文件写入或敏感信息读取。

发起外部网络请求
查看扫描证据(共 2 处,展示前 2 条)
  • 发起网络请求
    src/index.js:63
    response = await fetch(BALANCE_URL, {
  • 发起网络请求
    src/client.js:137
    fetch(BALANCE_ROUTE, {
扫描于 2026/11/3(1 天前) · 范围 入口闭包 + 全包扫描 · 来源 GitHub 仓库

静态扫描只反映源码中出现的调用,不构成安全背书;人工评估与自动扫描相互独立、互不覆盖。

依赖的 DSH / Cordis 模块
@deepseek-ai/cordis@deepseek-ai/dsh-client-runtime
给这个插件打分还没有人投票↓
用户评分
还没有人投票,来当第一个

功能亮点

  • 实时查看剩余余额
  • 上边栏显示

DeepSeek Harness 的 DeepSeek API 余额显示插件

README

由 DeepSeek 最新模型翻译生成
dsh-plugin-balance 一个轻量、零构建的 DeepSeek Harness (DSH) 插件:在 WebUI 上边栏显示你的 DeepSeek API 余额,紧挨系统自带的 "Session log" 按钮: [余额:12.34¥ ↻] [Session log] 效果示意图 功能 - 在上边栏右侧显示 DeepSeek API 当前余额,样式与系统自带的 "Session log" 按钮一致。 - 手动刷新:点击 ↻ 按钮。 - 自动刷新:仅页面加载(F5)后首次挂载时自动刷新一次;切换会话/界面不会自动刷新。 - 界面语言自适应:标签(余额/Balance)、加载文案、以及所有错误提示都跟随 DSH WebUI 的语言(简体中文 / English)切换。 - 失败原因明确:网络或凭据出错时,在余额位置以当前语言显示具体原因(如 余额:请求超时、余额:API Key 无效、余额:未配置 API Key)。 - 不消耗 API 额度:GET https://api.deepseek.com/user/balance 是免费查询接口,刷新余额不会消耗 token(余额减少是聊天本身在用)。
展开完整文档(README 剩余 1 节)
dsh-plugin-balance

一个轻量、零构建的 DeepSeek Harness (DSH) 插件:在 WebUI 上边栏显示你的 DeepSeek API 余额,紧挨系统自带的 "Session log" 按钮:

[余额:12.34¥ ↻] [Session log]

效果示意图

功能

- 在上边栏右侧显示 DeepSeek API 当前余额,样式与系统自带的 "Session log" 按钮一致。
- 手动刷新:点击 ↻ 按钮。
- 自动刷新:仅页面加载(F5)后首次挂载时自动刷新一次;切换会话/界面不会自动刷新。
- 界面语言自适应:标签(余额/Balance)、加载文案、以及所有错误提示都跟随 DSH WebUI 的语言(简体中文 / English)切换。
- 失败原因明确:网络或凭据出错时,在余额位置以当前语言显示具体原因(如 余额:请求超时、余额:API Key 无效、余额:未配置 API Key)。
- 不消耗 API 额度:GET https://api.deepseek.com/user/balance 是免费查询接口,刷新余额不会消耗 token(余额减少是聊天本身在用)。
- 与其他插件互不冲突:注册在加性插槽 conversation.session.header.utilities(replaceRisk: none),不替换任何自带 UI。

API Key 通过 DSH 自身的凭据通道读取(~/.dsh/.credentials.yaml → DEEPSEEK_API_KEY),不离开宿主进程。

下载

方式一(Git clone):

git clone https://github.com/anonRTtty/dsh-api-balance-displayer-plugin.git

方式二(ZIP):打开仓库页面 → Code → Download ZIP,解压后得到 dsh-plugin-balance/ 目录。

安装

三选一,不要混用(混用可能重复注册插件)。装完都要重启 DSH(或等 patch HMR 生效),然后硬刷新浏览器 Ctrl+Shift+R。

方式一:一键安装(Windows PowerShell,推荐)

无需 clone,直接运行(脚本会自动下载 release ZIP、复制到 profile 并启用):

irm https://raw.githubusercontent.com/anonRTtty/dsh-api-balance-displayer-plugin/main/scripts/install.ps1 | iex

或先 clone/解压后本地运行:

cd dsh-plugin-balance
powershell -ExecutionPolicy Bypass -File .\scripts\install.ps1

非默认 profile:powershell -ExecutionPolicy Bypass -File .\scripts\install.ps1 -ProfileName headless

方式二:官方 CLI(dsh plugin)

dsh plugin --profile web add github:anonRTtty/dsh-api-balance-displayer-plugin

本插件声明了 dsh.bundle,官方命令会把它加入 dsh.profile.bundles 并自动应用包内 cordis.patch.yml,无需手动改任何配置文件。

方式三:手动安装

1. 把整个 dsh-plugin-balance/ 目录复制到:

C:\Users\Administrator\.dsh\profiles\node_modules\dsh-plugin-balance\

2. 在 C:\Users\Administrator\.dsh\profiles\web\cordis.patch.yml 的 insert 列表中追加:

- insert:
- id: dsh-plugin-balance
name: dsh-plugin-balance

3. 重启 DSH。

卸载

一键卸载(Windows PowerShell):

irm https://raw.githubusercontent.com/anonRTtty/dsh-api-balance-displayer-plugin/main/scripts/uninstall.ps1 | iex

或本地运行:powershell -ExecutionPolicy Bypass -File .\scripts\uninstall.ps1

或手动:删除 cordis.patch.yml 中 dsh-plugin-balance 那两行,删除 C:\Users\Administrator\.dsh\profiles\node_modules\dsh-plugin-balance\,然后重启 DSH。

(若使用方式二安装,卸载时也请执行 dsh plugin --profile web remove dsh-plugin-balance。)

文件结构

dsh-plugin-balance/
├── package.json # 包声明 + dsh.bundle(官方 CLI 自动激活)+ dsh.client 注入 ├── cordis.patch.yml # bundle patch(官方 CLI 安装时自动应用) ├── src/ │ ├── index.js # Host 半部:/api/plugin.balance 路由(webServer 精确路由) │ └── client.js # 浏览器半部:双语余额胶囊(module-loader 格式) ├── scripts/ │ ├── install.ps1 # Windows 一键安装脚本 │ └── uninstall.ps1 # Windows 卸载脚本 ├── screenshot.png # 效果示意图 ├── README.md # 英文 ├── README.zh-CN.md # 简体中文 └── LICENSE

说明

- 余额接口:GET https://api.deepseek.com/user/balance(免费,不消耗 token);凭据读取 ~/.dsh/.credentials.yaml 中的 DEEPSEEK_API_KEY(与 DSH 内置模型路由同一凭据通道),Key 不离开宿主进程。
- 主机端通过 webServer 注册精确路由 /api/plugin.balance(与 dsh-plugin-session-delete 同款扩展点);浏览器端通过同源 fetch 获取余额。
- License: MIT
预览分享卡片长什么样 ↓anonRTtty/dsh-api-balance-displayer-plugin
分享 · DeepSeek Harness Hub
anonRTtty/dsh-api-balance-displayer-plugin

在上边栏实时查看 DeepSeek API 剩余余额

这是你的仓库?认领条目

回到顶部