@dougen/dsh-deepseek-usage

usagetested: passnpmMIT condition deviation

A DeepSeek Harness sidebar plugin: the active provider's account balance or subscription usage (DeepSeek, Moonshot/Kimi, GLM, OpenRouter, Kimi Coding, OpenCode, MiniMax, plus Claude Code and Codex OAuth tokens), provider-id mappings for third-party provid

📦 体积
1.46 MB · small
🔌 Network
undeclared
✅ Sandbox
pass
🏷️ Versions
43

Who this is for

  • developers using DSH for coding with Git workflows
下载量 / Downloads
0
依赖体积 / node_modules
1.46 MB
测试时间 / Tested
2026-11-06

Install

dsh plugin --profile web add @dougen/dsh-deepseek-usage

Sandbox test results

條件偏離 —— 本結果在 DSHIO/T 21 v0.9 條件下產生(內存 1g、CPU 1.5、T4 超時 60s,未記鏡像 digest)。偏離條款:5.1.3(内存 768MB)、5.1.3(CPU 1 核)、5.1.6(T4 超时 90s)、5.1.2(镜像 digest)。按 DSHIO/T 21 §8.2,該判定不得與標準條件結果比較,不得用作認證依據。
StageResult
T0 static check—
T1 install✓
T2 list✓
T3 mount—
T4 boot—

Four stages run in an isolated sandbox: install (network on) → list → mount → boot (last three with no network).

README

<img src="https://cdn.jsdelivr.net/npm/@dougen/dsh-deepseek-usage/icon.svg" alt="dsh-deepseek-usage icon" width="72" align="right" />

dsh-deepseek-usage

![npm version](https://www.npmjs.com/package/@dougen/dsh-deepseek-usage)

![CI](https://github.com/dougen/dsh-deepseek-usage/actions/workflows/ci.yml)

[English](README.md) | 中文

一个 DeepSeek Harness(DSH) 的侧边栏插件:在 DSH 主界面就能看到当前选中模型背后的账户还剩多少钱 / 多少额度、这个模型此刻什么价。覆盖九家提供商。

<img src="https://cdn.jsdelivr.net/npm/@dougen/dsh-deepseek-usage/screenshot.png" alt="侧边栏卡片:余额、当前单价与计费时段指示灯" width="520" />

余额形态(DeepSeek、Kimi、Z.ai、OpenRouter 等):账户余额、当前模型的输入 / 输入缓存 / 输出单价,右上角是峰谷时段指示灯。

<img src="https://cdn.jsdelivr.net/npm/@dougen/dsh-deepseek-usage/screenshot2.png" alt="订阅用量:各计费窗口的剩余额度" width="520" />

订阅形态(Kimi For Coding、OpenCode、MiniMax、Claude Code / Codex 等):每个用量窗口一个 D 形仪表盘——中间的数是剩余额度,灰色弧是已用量,绿色弧是剩余量(已用达到 80% 时转红),底部徽章标出窗口(5H = 5 小时、7D = 周、1M = 月)。

这个插件是干嘛的

DSH 可以切换很多家模型提供商,但每家的账户状况藏在不同的网站后台。这个插件会解析你在 DSH 里当前选中的模型属于哪家提供商,把那个账户的实时状态卡片放进 DSH 主界面侧边栏底部:

  • 账户读数,按提供商公开的内容分两种形态:
  • 余额类(DeepSeek、Moonshot / Kimi、智谱 Z.ai、OpenRouter)公开账户余额,卡片直接显示带币种符号(¥ / $)的余额。
  • 订阅类(Kimi For Coding、OpenCode、MiniMax、Claude Code、OpenAI Codex)没有余额可查,只公开用量窗口。卡片按接口返回的窗口各画一个仪表盘——5 小时、周、月,返回几个画几个——显示每份额度还剩多少,已用达到 80% 时剩余弧变红。
  • 卡片始终跟随当前选中的模型,切换提供商即切换读数;除凭据外不需要针对某家提供商再做任何配置。
  • 当前模型的单价。卡片列出输入 / 输入缓存 / 输出的单价,按此刻生效的计费时段取值,币种跟该提供商保持一致。有的提供商按时段计价——DeepSeek 官方峰谷(北京时间周一至周五 09:00–12:00、14:00–18:00 为高峰,夜间、周末、节假日为空闲)或 OpenRouter 的分时定价——卡片会用一枚橙 / 绿指示灯标出当前时段,悬浮可见距下次切换还剩多久。

如何安装和使用

第 1 步——配置提供商的凭据。 插件用你给该提供商配的那把 Key 查询:在 DSH 设置的模型页填好,或导出为环境变量(DEEPSEEK_API_KEY、MOONSHOTAI_API_KEY、ZAI_API_KEY、OPENROUTER_API_KEY、KIMI_CODING_API_KEY、OPENCODE_API_KEY、MINIMAX_API_KEY 等)。deepseek-account 是例外:它不需要密钥——在 DSH 里登录 DeepSeek 账号即可,卡片读的是登录留下的授权。

第 2 步——把插件装进 web profile:

dsh plugin --profile web add @dougen/dsh-deepseek-usage

第 3 步——重启 dsh web,打开它打印的地址。卡片位于侧边栏底部、Cordis 面板按钮下方;点击卡片可立即刷新。提供商映射与订阅令牌在设置 → DeepSeek 用量里配置;当前模型背后的路由不被支持时,卡片上会给出「去映射」按钮,点击直接打开这一页。

<details>

<summary>使用 Claude Code / OpenAI Codex 订阅(OAuth)</summary>

API Key 读不到这两种订阅——它们走 OAuth 令牌。当 DSH 检测到 Claude Code 或 OpenAI Codex(或有映射目标指向其中之一),设置 → DeepSeek 用量 的提供商映射下方会出现令牌填写框。把令牌粘贴进去,侧边栏卡片即可开始显示该订阅的余量:

  • Claude Code——在已登录 Claude Code 的机器上,从 ~/.claude/.credentials.json 复制 claudeAiOauth.accessToken(macOS 在钥匙串项 Claude Code-credentials 里)。claude setup-token 产生的令牌也能用。
  • OpenAI Codex——从 ~/.codex/auth.json 复制 tokens.access_token 填进令牌框,tokens.account_id 填进账号 ID 框。

令牌经 DSH 的凭据服务保存在本机(~/.dsh/.credentials.yaml),任何响应、日志、页面元素都不会把它带出去;点清除按钮即可删除。

</details>

<details>

<summary>卸载</summary>

dsh plugin --profile web remove @dougen/dsh-deepseek-usage

然后重启 dsh web。

</details>

支持的 DSH 版本

插件版本要与 DSH 版本相配:

DSH 版本 · 应安装的插件版本

0.2.x(0.2.0-rc.1 起) · 0.11.0 及以后

0.1.x(0.1.0-rc.6 起) · 0.10.x,或 0.11.0 及以后

运行 dsh --version 查看你的 DSH 版本。不带版本号安装会自动取最新的兼容版本;最新版与你的 DSH 不匹配时,指定确切版本,例如 @dougen/dsh-deepseek-usage@0.10.2。

Rendered from the README published on npm. Formatted only, not edited.

Embed the badge

Two badges, each using its own site's identity: left is the **standard** (published by DSHIO), right is the **testing organization** (deepseekbase, which ran the inspection). Each links to the standard text and the test report.

DSHIO/T 10deepseekbase

Markdown(推荐,两个一起)

[![DSHIO/T 10](https://deepseekbase.com/badge/std.svg)](https://dshio.org/10/) [![deepseekbase](https://deepseekbase.com/badge/dougen-dsh-deepseek-usage.svg)](https://deepseekbase.com/zh/plugins/dougen-dsh-deepseek-usage/)

Note: this is not a certification. DSHIO/T 32 is not in effect.

Versions

Published on npm::43,最后更新 2026-11-05

Links

GitHub · Homepage · npm

Frequently asked

How do I install @dougen/dsh-deepseek-usage?
Run dsh plugin --profile web add @dougen/dsh-deepseek-usage in DSH, or paste the package name into the DSH Desktop plugin page.
What if it fails to install?
Check your DSH version first (dsh --version), then look at the first error in the test-results section. If it still fails, open an issue on the repository.
How do I uninstall it?
Run dsh plugin --profile web remove @dougen/dsh-deepseek-usage.

Same category

Compare with peers

PluginDownloadsVerdictSize
dsh-context340.3Kpass6.64 MB
dsh-cost-meter122.2Kpass10.38 MB
@kenz1117/dsh-ui-usage-billing13.7Kpass1.06 MB
@dougen/dsh-deepseek-usage12.6Kpass1.46 MB
dsh-fast-mode11.6Kpass1.37 MB
dsh-subusage11.4Kpass480.79 MB
dsh-aiignore10.1Kpass0.46 MB
dsh-profile-stats8.4Kpass0.18 MB