Bundle
dsh-quota-viewer
Multi-provider quota dashboard for DeepSeek Harness: DeepSeek official balance, jojo code, SCNet, Ark Coding Plan and OpenCode Zen Go usage windows in the sidebar footer, with 90-day local history and console login flows.
- Source
- black970
- License
- MIT
- Updated
- Updated 15 hours ago
Readme
# dsh-quota-viewer
在 DSH 侧边栏底部查看各家模型服务的额度与用量:DeepSeek 官方余额、jojo code 订阅窗口、SCNet 超算用量、方舟 Coding Plan 用量,并保存 90 天本地历史绘制趋势。
A multi-provider quota panel for DeepSeek Harness: DeepSeek official balance, jojo code, SCNet and Ark Coding Plan usage windows in the sidebar footer, with 90 days of local history.
---
## 它做什么
侧边栏底部出现一行**额度概览**(侧边栏收成图标栏时变成底部的悬浮卡片)。点它展开详情面板:
- 按提供方分组,逐项显示**已用 / 上限 / 剩余 / 百分比**、日额度、到期时间、按当前速度**估算的可用天数**、上次更新时间(「3 分钟前」这类相对时间)
- 顶部一行汇总所有提供方的状态
- 提供方之间可切换,也能新增/保存**各自的 token**
- 展开后每个提供方下方是**天趋势图**(读本地历史)
- 面板打开时每 10 分钟自动刷新一次;也可手动点「更新」
## 支持的提供方
| 提供方 | 数据来源 | 前置条件 |
| --- | --- | --- |
| **DeepSeek 官方** | 开放平台余额(`platform.deepseek.com` 的余额接口) | 凭据服务里能解析到 `DEEPSEEK_API_KEY` |
| **jojo code** | 登录控制台后的订阅窗口(时长窗口 / 日额度 / 到期时间) | 面板内用控制台邮箱 + 密码登录一次,会话过期自动续期 |
| **SCNet 超算** | 控制台 Token Plan 用量 | 扫码登录或账号密码登录;会话保活失败会在面板里提示 |
| **方舟 Coding Plan** | 本机 `arkcli usage plan --product coding-plan` | 已安装 `arkcli` 且已登录火山账号(Coding Plan 没有仅凭 API Key 可调的用量接口) |
任何一家没配置好,**不会影响其他家**:该行显示「未配置 / 暂不可用」和需要做什么,其余照常显示。
## 安装
```sh
dsh plugin --profile web add github:black970/dsh-quota-viewer
```
装完重启(或 reload)DSH,侧边栏底部即出现额度行。
## 数据与隐私
- 宿主半只注册**回环地址可用**的 HTTP 路由(请求来源必须是 `127.0.0.1` / `::1`,且 Host 头匹配本机),接口**只返回总量与百分比,从不返回密钥**
- 密钥解析走 DSH 的凭据服务,按次请求解析;面板里保存的 token 存在本机
- 历史数据落在本机 `~/.dsh/quota/history.db`(SQLite):同一提供方同一指标**10 分钟内只留一条**采样,每个指标**保留最近 90 天**
- 插件**没有任何 npm 运行时依赖**,宿主半只 import `node:fs` / `node:path` / `node:os` / `node:sqlite` / `node:crypto` / `node:child_process` 这些内置模块;客户端半只 `require('react')`
- 出网请求只发给上面表格里那些服务的官方域名(DeepSeek 开放平台、jojocode、scnet、火山),没有遥测
## 文件
```
lib/index.js 宿主半:各提供方查询 + SQLite 历史 + 回环 HTTP 路由
lib/client.js 客户端半:侧边栏额度行、详情面板、登录与 token 表单、趋势图
cordis.patch.yml bundle 装配清单(id: quota-viewer)
```
## 用法要点
- **点额度行展开 / 收起**详情面板
- **登录类提供方**(jojo、SCNet)在面板里有各自的登录区:jojo 用邮箱+密码,SCNet 支持扫码或账号密码;勾选「设置长效登录」后 token 失效会自动重登
- **token 类提供方**可以在面板里直接填入并保存,也可以切回凭据服务里的值
- 面板里的**趋势图**按提供方与指标(余额 / 已用比例)分别读取本地历史,可切换天数
## 许可证
MIT
Install
dsh plugin --profile web add github:black970/dsh-quota-viewer
Profile: web
With the hub plugin installed, ask your agent to install it by name — it resolves the same plan shown here.
dsh plugin --profile web add github:stvlynn/dsh.fish#path:packages/dsh-plugin-hub
install dsh-quota-viewer from the hub
- This source has no pinned commit, so a later push upstream changes what installs. Prefer pinning a commit.