DeepSeek Harness Plugin Hub

发布与管理完整 Harness Profiles,发现适合你的插件。

探索

插件目录环境预设文档中心动态

社区

发布插件联系我们报告问题

相关链接

Plugin Hub GitHubDeepSeek Harness 官方项目系统状态隐私说明
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

独立、非官方社区项目,与 DeepSeek 官方无隶属、授权或背书关系。

Deepseek Usage — DeepSeek Harness 插件(DSH Plugin)
DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录
← Plugins

@xavier711/dsh-deepseek-usage

Deepseek Usage

DSH Web GUI 的 DeepSeek 使用情况面板:账户余额(官方 /user/balance API),以及按模型和工作区统计的本地会话令牌数据

插件会安装到这里;不确定时保持 web。

npx -y @deepseek-ai/dsh plugin --profile web add @xavier711/dsh-deepseek-usage@0.4.3
README兼容性版本

兼容性与来源证明

Deepseek Usage 以 @xavier711/dsh-deepseek-usage 发布,当前版本为 0.4.3。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

DSH 兼容范围
*
运行环境
web
发布来源
npm
Registry 更新时间
2026/9/22

版本

0.4.3stable
2026/9/10
0.4.2stable
2026/8/31
0.4.1stable
2026/8/24
查看其余 4 个版本收起版本
0.4.0stable
2026/8/24
0.3.1stable
2026/8/23
0.3.0stable
2026/8/20
0.2.0stable
2026/8/17

相关插件

正在加载相关插件…

最新版
0.4.3
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
127 kB
文件数
8
Surface
web
许可证
MIT
发布源
npm
周下载
94
查看源码 ↗项目主页 ↗
README Badge

点击下方 Badge 复制 Markdown,粘贴到 README 即可。

这是你的 Plugin?认领权益 · 优先安全扫描

验证 package.json 声明的 GitHub 仓库,即可管理这个公开页面。认领后,Hub 会优先安排当前版本的安全扫描,并在通过后公开展示结果。

认领这个 Plugin →
报告问题

README

dsh-deepseek-usage

中文版

A DeepSeek usage panel plugin for the DeepSeek Harness Web GUI. It adds a 「Usage / 用量」 entry at the bottom of the left sidebar showing:

  • Account balance — queried live from the official endpoint GET /user/balance (total, topped-up, granted).
  • Local usage — replays your own session logs (which store the official per-request usage records) and shows: today / last 7 days / all time, a 7-day chart, today's token composition, per-model statistics, and per-workspace statistics (a workspace is the session's project directory; a collapsible panel expands each workspace into its own session records, and subagent sessions count toward their parent workspace).
  • Cost estimate — priced per model at official DeepSeek rates (CNY per 1M tokens), including the V4 peak/off-peak pricing effective 2026-08-17 (peak hours in Beijing time are applied automatically), the 2026-08-23 rule change — weekends (Sat/Sun) are all-day off-peak — the 2026-09-10 12:00 flash-series price cut (off-peak ¥1 input / ¥0.02 cache hit / ¥4 output, peak doubled) and the 2026-09-14 12:00 retirement of V4 Pro (routed to and billed as V4.1 Flash). The sidebar entry and the panel header show a live current-period indicator (peak/off-peak, with the active time window and the next transition).
  • Works across DSH versions — session history is read through whichever sessionPersistence seam the running harness exposes: the current snapshot-list + open(id,'read') handle API, or the older header-list + inspect() API. The panel no longer comes up empty on a newer harness.

Note: DeepSeek's API does not expose an account-level usage endpoint (all candidate paths return 404 in practice). The usage data therefore comes from your local session logs — which contain the exact usage values returned by the official API for every request.

Screenshots

The panel opens from the 「用量」 entry at the sidebar foot. All figures below are synthetic sample data — no real balance, keys, tokens, or session content.

Dark themeLight theme
Usage panel, dark themeUsage panel, light theme

Install (pick one)

You need Node.js first (download from nodejs.org).

Option A: Install straight from GitHub (recommended, one command)

Paste this into a terminal:

dsh plugin --profile web add git+https://github.com/xavier711/dsh-deepseek-usage.git#v0.4.3

Don't have dsh installed globally? Use this instead (npx downloads it on first run):

npx --yes @deepseek-ai/dsh plugin --profile web add git+https://github.com/xavier711/dsh-deepseek-usage.git#v0.4.3

Tip: if the installer complains that pnpm is missing, run npm install -g pnpm and retry.

Option B: Clone + one-shot script

git clone https://github.com/xavier711/dsh-deepseek-usage.git
cd dsh-deepseek-usage
./install.sh     # auto-uses npx when dsh is not on PATH

Option C: npm

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

After installing (any option)

  1. Restart the web server: Ctrl+C in the terminal running dsh web, then run dsh web again (or npx --yes @deepseek-ai/dsh web).
  2. Refresh the browser page: the 「用量」 entry appears at the sidebar foot, just above Settings.

Because the package declares dsh.bundle, the plugin row is activated automatically — no manual config editing.

Optional: configure an API key (for the balance card)

Add a line to ~/.dsh/.credentials.yaml (replace sk-xxxx with your key):

DEEPSEEK_API_KEY: sk-xxxx

Or set the DEEPSEEK_API_KEY environment variable. Without a key, local usage statistics still work; the balance card just shows a hint.

Uninstall

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

Then restart dsh web and refresh the page.

Privacy

The plugin never embeds an API key (no key material in the package). The key is resolved at runtime from the recipient's own machine — ~/.dsh/.credentials.yaml or the environment — and only on the host (server) side; the browser bundle never sees it. Safe to share.

Layout

lib/index.js       host half — /dsh-usage/balance + /dsh-usage/local + /dsh-usage/period routes
lib/client.js      browser half — sidebar action + panel (hand-built bundle, no build step)
cordis.patch.yml   the plugin's own patch layer (dsh.bundle — auto-activated on install)
install.sh         one-shot installer

Configuration (optional, usually not needed)

Override row config by id in ~/.dsh/profiles/web/cordis.patch.yml:

- id: deepseek-usage
  config:
    balanceTtlMs: 60000        # balance cache TTL (ms)
    maxSessions: 100           # most-recent sessions to replay
    sessionConcurrency: 4      # parallel session-log reads
    balanceTimeoutMs: 10000    # balance request timeout
    localTtlMs: 30000          # local-usage cache TTL (ms); keeps signal-driven badge refreshes cheap
    newPricingAt: 1786896000000      # peak/off-peak pricing effective date (2026-08-17 00:00 Beijing)
    weekendOffPeakAt: 1787414400000  # weekends all-day off-peak rule effective date (2026-08-23 00:00 Beijing)
    peakHours: [[9,12],[14,18]]      # Beijing peak windows
    # pricing: per-model rates (CNY per 1M tokens); an entry may carry
    #          eras: [{ at, peak, offPeak }] for rates that change from a
    #          moment on (2026-09-10 12:00 flash price cut, 2026-09-14 12:00
    #          V4 Pro billed as V4.1 Flash) — see the source repo

Updating

npm installs: run dsh plugin --profile web update @xavier711/dsh-deepseek-usage (or re-add with the new version: ... add @xavier711/dsh-deepseek-usage@X.Y.Z).

Git installs: you installed a pinned snapshot, so updates are not automatic — but you don't need to check for them: the plugin queries the GitHub releases feed (hours-cached) whenever you open the usage panel and shows a 「New version available」 banner with the exact update command. Simply run it, restart dsh web, and refresh the page:

dsh plugin --profile web remove @xavier711/dsh-deepseek-usage
dsh plugin --profile web add git+https://github.com/xavier711/dsh-deepseek-usage.git#v0.4.3

Troubleshooting

I see dsh: warning: ... declares no dsh.bundle — installed as a plain dependency

You installed an older snapshot of the repository (pnpm caches git dependencies by commit, so an install that happened before this package declared dsh.bundle keeps the old version). Fix it by reinstalling from the pinned tag:

dsh plugin --profile web remove @xavier711/dsh-deepseek-usage
dsh plugin --profile web add git+https://github.com/xavier711/dsh-deepseek-usage.git#v0.4.3

Then restart dsh web and refresh the page.

The 「用量」 entry does not appear after installing

Make sure the web server was restarted after the install (Ctrl+C in the dsh web terminal, then run it again) and that you hard-refresh the browser page (Cmd/Ctrl+Shift+R).

HTTP routes

  • GET /dsh-usage/balance — { ok, isAvailable, currency, totalBalance, grantedBalance, toppedUpBalance, ... }
  • GET /dsh-usage/local — { ok, sessionCount, errorSessions, pricing, buckets: { today, week, total }, days: [...7], models: [...], workspaces: [...], sessions: [...] } — each workspace entry is { path, name, sessionCount, subagentSessionCount, buckets: { today, week, total }, sessions: [...] } (sessions without a working directory group under path: null); each session row carries workspace and subagent (pricing includes newPricingAt, weekendOffPeakAt, peakHours)
  • GET /dsh-usage/period — { ok, now, period: 'peak'|'offPeak'|'flat', range: [start, end] minutes-of-day, nextAt, nextPeriod, peakHours, weekendOffPeakAt, timezoneOffsetMinutes } — current Beijing peak/off-peak classification for the sidebar badge and the panel header; nextAt/nextPeriod describe the next actual period change (weekends skip to the next weekday's first peak start)

相关插件

继续浏览 models-usage 分类下经过校验的插件。

Whale Widgetdsh-whale-widgetDSH Web 界面右下角的 DeepSeek 余额小鲸鱼挂件:余额/今日已用/峰谷定价、自定义泡泡点击序列(文本/余额/今日/峰谷/图片/随机语句与并列加权选择)、逐行样式与字体、悬浮快捷编辑、音效与每轮消耗、自定义角色/动图/音效、吸附与翻转自定义Cost Meterdsh-cost-meterDeepSeek Harness 会话费用统计插件:本会话成本、当日费用、历史记录与官方价格同步,支持多厂商多模型价格计费(内置 90+ 模型价格目录与自动匹配)、主流 Coding Plan 订阅额度查询与显示(9 家,含 SCNet Token Plan 本地 Credits 计量与火山方舟 Volcano Ark Coding Plan AK/SK 签名查询)、自定义 Provider 余额查询(可配任意 HTTP 端点)与余额进度条、峰谷计价时段显示与切换前弹窗/系统通知提醒(位置/提前量/类型可Commandcode Provider@mars-sea/dsh-commandcode-provider适用于 Command Code 的非官方 DeepSeek Harness LLM 提供商插件,移植自 pi-commandcode-provider(MIT)。注册“commandcode”提供商路由,并在 Models 页面添加卡片和实时模型目录。Codex Connectdsh-codex-connect用于 DeepSeek Harness 的 ChatGPT OAuth 和 Codex 模型。