DeepSeek Harness Plugin Hub

Publish and manage complete Harness Profiles. Discover Plugins for your next setup.

Explore

PluginsPresetsDocsNews

Community

Publish a pluginContactReport an issue

Resources

Plugin Hub on GitHubDeepSeek HarnessSystem statusPrivacy notice
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

Independent and unofficial. Not affiliated with, authorized by, or endorsed by DeepSeek.

Account Usage — DSH Plugin for DeepSeek Harness
← Plugins
A

dsh-account-usage

Account Usage

DeepSeek Harness web-GUI plugin: a Settings「账户」page showing DeepSeek platform balance/usage (daily cost chart, per-model requests & tokens, selectable time range) and the OpenCode Go 5h/weekly/monthly quota with reset times.

The plugin will be installed here. Keep web if you are unsure.

npx -y @deepseek-ai/dsh plugin --profile web add github:Ycet/dsh-account-usage#82eba813ea4a8a09fe116994c470f378375880b3
READMECompatibilityVersions
DeepSeek 平台「账户」页界面截图OpenCode Go 配额「账户」页界面截图

Compatibility and provenance

Account Usage is published as dsh-account-usage and currently resolves to version 0.1.23. The Hub verifies its manifest and preserves the exact installation source for reproducible installs.

DSH compatibility
*
Runtime surfaces
web
Release source
github
Registry updated
9/13/2026

Versions

0.1.23stable
9/13/2026
0.1.22stable
9/7/2026
0.1.21stable
8/22/2026
Show 2 more versionsCollapse versions
0.1.16stable
8/21/2026
0.1.15stable
8/20/2026

Related plugins

Loading related plugins…

Latest
0.1.23
DSH
*
HMR
Process restart
Tree shaking
Safe tree shaking not declared
Unpacked size
Unavailable
Files
Unavailable
Surface
web
License
MIT
Source
github
GitHub
★ 2
Weekly downloads
0
Last push
9/13/2026
View source ↗
README badge

Click the badge to copy Markdown for your README.

Do you maintain this Plugin?Claim benefit · Priority security scan

Verify the GitHub repository declared in package.json to manage this listing. After you claim it, Hub will prioritize a security scan of the current version and publish the result when it passes.

Claim this Plugin →
Report an issue
DeepSeek Harness Plugin Hub
ProfilesPluginsCategoriesNewsDocsSign inManage Profiles
ProfilesPluginsCategoriesNewsDocsSign in

Related plugins

More verified plugins in models-usage.

Usage@linxin666/dsh-usageUsage statistics plugin for the dsh web GUI: per-provider balance and coding-plan quota detection plus a live token usage ledger, with the current session provider's today usage on the sidebar entryUsage Stats@ychris12138/dsh-usage-statsToken usage heatmap, provider balances, and subscription quotas for the dsh web GUICodex Connectdsh-codex-connectChatGPT OAuth and Codex models for DeepSeek Harness.Ui Usage Billing@kenz1117/dsh-ui-usage-billingUsage billing dashboard for DeepSeek Harness: sidebar cost metrics plus a full dashboard modal, priced from a current multi-provider catalog with real usage aggregated from session logs.

README

dsh-account-usage

DeepSeek Harness(DSH)网页界面插件:在设置面板新增「账户」页,一站式查看 DeepSeek 平台余额/用量与 OpenCode Go 配额。


📑 目录

  • 📸 界面预览
  • ✨ 功能特性
  • 🚀 快速开始
  • ⚙️ 配置说明
  • 📖 使用说明
  • 🔧 工作原理
  • 🧰 环境变量
  • ⚠️ 已知限制
  • 🛠️ 开发
  • 🤝 贡献
  • 📄 许可证

📸 界面预览

DeepSeek 平台页:余额概览、时间维度与自定义区间、每日消费/Token 柱状图、按模型明细表。

DeepSeek 平台「账户」页界面截图

OpenCode Go 配额页:5 小时滚动 / 每周 / 每月三个窗口的用量进度条、重置时间与限额参考。

OpenCode Go 配额「账户」页界面截图


✨ 功能特性

功能说明
DeepSeek 平台概览充值余额、赠送余额、累计消费金额、本月消费金额、本月 Tokens
每日柱状图消费金额与 Token 消耗双图表,SVG 渲染,鼠标悬停查看每日明细
时间维度切换今天 / 近 7 天 / 近 30 天 / 近 90 天 / 本月 / 上月 / 自定义区间
按模型明细表deepseek-v4-flash / deepseek-v4-pro / 其他:请求次数、输入/缓存/输出 Tokens、费用
OpenCode Go 配额5 小时滚动 / 每周 / 每月三个窗口的用量百分比与下次重置时间
自动刷新页面挂载期间每 60 秒自动轮询最新数据
双语言界面完整的中英文切换支持

🚀 快速开始

前提条件

  • 已安装 DSH CLI 与 pnpm(dsh plugin 内部转发到 pnpm)

安装

# 方式一:从本地源码安装(开发)
dsh plugin --profile web add <absolute-path-to-plugin>

# 方式二:从 GitHub 安装
dsh plugin --profile web add github:Ycet/dsh-account-usage

包声明了 dsh.bundle 补丁层,dsh plugin 会自动把加载项合入 profile 的 bundle 层,无需手动编辑 cordis.patch.yml。

手动合并补丁层(可选)
# ~/.dsh/profiles/web/cordis.patch.yml
- insert:
    - id: account-usage
      name: dsh-account-usage

启动

  1. 重启网页应用:dsh web
  2. 打开 http://127.0.0.1:3080 并刷新页面
  3. 设置面板出现「账户」页

⚙️ 配置说明

DeepSeek 平台令牌(必需,仅影响 DeepSeek 面板)

用量接口是平台控制台的私有接口,需要你的平台登录令牌:

  1. 登录 https://platform.deepseek.com

  2. 打开 DevTools → Console,执行:

    JSON.parse(localStorage.getItem('userToken')).value
    
  3. 在插件「账户」页的令牌输入框直接粘贴并保存(写入 ~/.dsh/.credentials.yaml 的 DEEPSEEK_PLATFORM_TOKEN)

手动写入凭据文件(可选)
# ~/.dsh/.credentials.yaml
DEEPSEEK_PLATFORM_TOKEN: <令牌>

令牌只存储在本机凭据库,浏览器与网络请求均不携带它往返上游以外的任何位置。

OpenCode Go Key(通常无需配置)

插件按以下顺序自动查找:

  1. DSH 凭据 OPENCODE_GO_API_KEY(~/.dsh/.credentials.yaml,在「设置 → 模型」配置 opencode-go 时通常已存在);
  2. OpenCode 自身的 ~/.local/share/opencode/auth.json(opencode-go 条目,type 为 api)。

📖 使用说明

  • 在设置面板「账户」页顶部切换 deepseek / opencode go 两个标签查看对应数据;
  • DeepSeek 页可切换时间维度(今天 / 近 7 天 / 近 30 天 / 近 90 天 / 本月 / 上月),或选择「自定义区间」后点击「应用」;
  • 柱状图支持鼠标悬停查看每日明细;模型明细表展示所选区间内各模型的请求次数、Tokens 与费用;
  • OpenCode Go 页展示三个配额窗口的用量百分比、下次重置时间与限额参考,可一键「跳转」到 opencode.ai 或「刷新」;
  • 页面挂载期间每 60 秒自动刷新;「打开配置文件」按钮可直接定位本机 DSH 凭据文件。

🔧 工作原理

双面插件(宿主 + 浏览器),数据通道为宿主注册的同源 HTTP 路由:

部分文件作用
宿主index.js注册三条 GET /api/account-usage/* 精确路由(deepseek-summary / deepseek-usage / opencode);经 ctx.credentials 解析密钥,固定白名单上游 URL,15s 超时 + 30s 缓存
解析聚合lib/aggregate.js纯函数:平台信封解包后的每日/每模型 token、费用、请求次数聚合
浏览器client.js手写惰性 CJS 客户端包:注册 settings.section(id account),渲染账户页(SVG 柱状图、维度选择器、模型表、配额进度条),挂载期间每 60s 自动刷新
组合cordis.patch.ymldsh.bundle 补丁层,安装时自动合入

数据源

用途端点认证
账户概要platform.deepseek.com/api/v0/users/get_user_summary(+/get_user_info)Bearer <userToken>
每日 token 明细platform.deepseek.com/api/v0/usage/amount?month=&year=Bearer <userToken>
每日费用明细platform.deepseek.com/api/v0/usage/cost?month=&year=Bearer <userToken>
OpenCode Go 配额opencode.ai/zen/go/v1/usage(官方)Bearer <sk-opencode-…>

🧰 环境变量

变量默认说明
DSH_ACCOUNT_USAGE_TIMEOUT_MS15000上游请求超时(毫秒)
DSH_ACCOUNT_USAGE_CACHE_MS30000平台数据缓存 TTL(毫秒)
DSH_ACCOUNT_USAGE_MAX_MONTHS3单次查询可覆盖的最大月份数(超出自动裁剪)
DSH_ACCOUNT_USAGE_OPENCODE_CACHE_MS60000OpenCode 配额缓存 TTL(毫秒)

⚠️ 已知限制

  • DeepSeek 平台用量接口为未公开的私有接口,字段可能随平台升级变化;插件对响应做防御式解析,字段缺失时降级为「—」而非报错。若页面长期显示「—」,请重新抓包确认字段并反馈。
  • 「累计消费金额」「API 请求次数」字段不在公开文档中:累计消费按命名启发式在概要响应中搜索(找不到则显示「—」),请求次数读取模型条目上的 count/requests/request_count/req_count/calls 字段。两者均在真实令牌实测后校准。
  • OpenCode Go 的限额($12/$30/$60)为套餐参考值,端点未返回限额;套餐调整时以 opencode.ai 页面为准。
  • 服务绑定 0.0.0.0 时本插件路由对局域网可达(与 DSH 其他本地插件相同的既有限制,默认 127.0.0.1 无此问题)。

🛠️ 开发

node --check index.js          # 宿主语法检查
node --check lib/aggregate.js  # 聚合模块语法检查

# 本地安装(开发迭代):
dsh plugin --profile web add <absolute-path-to-plugin>
# 修改源码后需重新安装(先 remove 再 add,或提升版本号后重新 add),再重启 dsh web

修改 client.js 后需重启 dsh web(重新生成 boot-graph 哈希),再强制刷新页面。

[!NOTE] dsh plugin 在 Windows 下经 shell 转发 pnpm,安装路径不能含空格;工作区路径含空格时可先在无空格路径建目录联接(mklink /J)作为安装网关。


🤝 贡献

欢迎提交 Issue 与 Pull Request:发现问题请携带界面截图与版本号到 Issues 反馈;改进请按 Fork → 分支 → PR 流程提交。


📄 许可证

本项目使用 MIT 许可证。