DeepSeek Harness plugin

dsh-deepseek-usage-azurehal

Minimal DeepSeek balance & usage dashboard for DeepSeek Harness(极简的 DeepSeek 余额/用量面板)

Jump to install

Source facts

Repository
AzureHalcyon/dsh-deepseek-usage
Latest update
Aug 17, 2026
Category
Development & Runtime
GitHub stars
1
Format
plugin
Catalog evidence
Upstream dsh.bundle evidence
Evidence path
package.json#dsh.bundle
Checked against
0.1.0-rc.8
Upstream check date
2026-08-20

This evidence comes from the upstream catalog. This site has not installed, run, or security-reviewed the plugin.

Install

Start with a prompt that asks an agent to review the GitHub repository and source. Switch to the command if you want to install it yourself.

Copy this prompt into DSH, Codex, or another agent and ask it to review the GitHub repository and source first.

Do not install or run any commands yet. Read this plugin's GitHub repository, README, and relevant source code. Then answer the questions below clearly and directly so I can decide whether it fits my needs:

1. What is this plugin, and what problem does it solve?
2. Who is it for, and what are its typical use cases?
3. How is it used after installation? Include one minimal example.
4. What known limitations or privacy, security, compatibility, or maintenance risks does it have?
5. Give a clear recommendation: recommend, conditionally recommend, or do not recommend, with reasons.

Distinguish statements documented by the repository, inferences from source code, and unknowns. If evidence is insufficient, say so explicitly. Do not guess or simply repeat the README.

GitHub: https://github.com/AzureHalcyon/dsh-deepseek-usage
Plugin: dsh-deepseek-usage-azurehal
Author: AzureHalcyon

Check the source files

Read the README and other files from this plugin directory before installing.

File explorer3 files
README.mdSource · read only

<h1 align="center">dsh-deepseek-usage</h1> <p align="center">在 DSH 设置页查看 DeepSeek 余额与用量。</p>

功能

功能说明
账户余额官方 GET /user/balance,多币种(总余额 / 充值 / 赠送)+ 可用状态灯(绿/黄/红/灰)
用量统计今日 / 本月 token、消费、请求次数(今日按北京时间 0 点起算),以及缓存命中 / 未命中 / 输出的 token 构成
分模型拆分每个模型的 token 用量与消费
分 API Keyapi_key_name 筛选单个 key 的用量(对应官方页面的「按 API 筛选」)
总消费全部历史累计消费(逐月汇总)
自动刷新可勾选「每 60 秒自动刷新」,偏好持久化

截图

![主界面](screenshot-main.png)

![用量与分模型](screenshot-details.png)

细节说明

数据来源

数据接口认证
余额api.deepseek.com/user/balance(官方公开)API Key
本月用量 / 消费platform.deepseek.com/api/v0/usage/amountusage/cost(网页接口)登录态 userToken
今日用量 / 消费platform.deepseek.com/api/v0/usage/export(北京时间窗口)登录态 userToken

> 今日按北京时间(本地时区)0 点起算:平台月接口按 UTC 切分日数据,今日口径按 usage/export 窗口统计。

> 用量 / 消费接口是 platform.deepseek.com 的私有接口,非官方公开 API,可能随时变更。

凭据

凭据存放说明
API KeyDSH 凭据服务 DEEPSEEK_API_KEY(与调用 LLM 共用,只读)在 DSH 模型设置中更改
userTokenDSH 凭据服务 DEEPSEEK_USER_TOKEN由用户手动粘贴,不读取浏览器数据

安全设计

  • 凭据服务端保存:API Key 和 userToken 都走 DSH 凭据服务;手动输入的 Token 会通过设置页的一次性请求提交到本地 DSH 服务,插件不会读取浏览器数据库。
  • Node 原生 fetch 直连:无 shell / 子进程中间层,凭据只在进程内存流转。
  • 回环 + 同源守卫:所有路由仅接受 127.0.0.1 回环与同源请求,内置 DNS-rebinding 防护;这不是对同机其他进程的独立认证。
  • 稳定错误码 + 最小日志:日志只记录 {code, status}

安装

正式使用(从 GitHub 安装):

dsh plugin --profile web add github:AzureHalcyon/dsh-deepseek-usage#2bb93b9

本地开发(link 安装):

dsh plugin --profile web add link:<本仓库绝对路径>

装完重启 DSH。

使用

1. 打开 设置 → DeepSeek 用量; 2. API Key 自动复用 DSH 的 DEEPSEEK_API_KEY(只读展示,无需额外配置); 3. 登录 DeepSeek 开放平台后,在浏览器控制台执行 localStorage.getItem("userToken"),将结果手动粘贴到插件中;插件不会扫描浏览器数据; 4. 点「立即同步」。

插件管理

已装插件建议用 plugin-registry 的薄控制台管理(浏览器面板):管理 profile 插件安装态(bundle 层栈 + insert 行 + 启停),无需手改配置。安装:

dsh plugin --profile web add "github:vlln/plugin-registry#b0ae1ea03a6c04c548dd10bf58f0fe7a70a92b29&path:/packages/plugin/console"