@ek3os/dsh-balance
Manifest validDeepSeek Harness Web plugin that shows the API balance beside Settings in the sidebar.
dsh-balance
English
A DeepSeek Harness Web plugin that displays your DeepSeek API balance in the sidebar footer.

The plugin is currently
0.1.0and requires DeepSeek Harness>=0.1.0-rc.7.
Features
- Displays CNY and USD balances next to the sidebar settings area.
- Reads the balance through the official DeepSeek API endpoint.
- Keeps the API key on the server side; the browser only receives normalized balance data.
- Refreshes the balance automatically every 60 seconds.
- Shows
--while loading, when no balance is available, or when the request fails. - Supports installation directly from a GitHub repository.
Requirements
- DeepSeek Harness
>=0.1.0-rc.7 - The
webprofile - A configured
DEEPSEEK_API_KEY
Installation
Install directly from GitHub
dsh plugin --profile web add github:eka3os/dsh-balance
Restart the Web profile after installation:
dsh web
dsh plugin installs the package into the selected profile and automatically activates it as a profile bundle because this package declares dsh.bundle.patch.
Configuration
The plugin uses the DEEPSEEK_API_KEY credential reference. Configure the key through the DeepSeek Harness credentials/settings UI when available. You can also provide it through the launch environment for a single run:
DEEPSEEK_API_KEY=sk-your-key dsh web
For a managed local credential, add the key to $DSH_HOME/.credentials.yaml:
DEEPSEEK_API_KEY: sk-your-key
Do not commit API keys or credential files to Git.
How it works
- The Host plugin registers
GET /api/dsh-balance. - The route resolves
DEEPSEEK_API_KEYthrough DSH credentials. - The Host requests
https://api.deepseek.com/user/balancewith a server-side Bearer token. - The client plugin renders the returned CNY/USD balances in the sidebar footer.
- The client repeats the request every 60 seconds while the wide sidebar is visible.
API endpoint
| Method | Path | Description |
|---|---|---|
GET, HEAD | /api/dsh-balance | Returns the current DeepSeek API balance. |
Successful responses contain the following shape:
{
"isAvailable": true,
"balances": [
{ "currency": "CNY", "totalBalance": "10.00" },
{ "currency": "USD", "totalBalance": "1.00" }
]
}
The route returns 503 when the credential is missing and 502 when the DeepSeek API cannot be reached or returns an unsuccessful response. Unsupported methods return 405.
GitHub distribution
This plugin is distributed through GitHub only and is not published to npm. Push the repository to GitHub and make sure the built lib/ files and the package files listed in package.json are committed.
License
MIT
中文
一个用于 DeepSeek Harness Web 界面的插件,会将 DeepSeek API 余额显示在侧边栏底部。

当前版本为
0.1.0,要求 DeepSeek Harness>=0.1.0-rc.7。
功能
- 在侧边栏设置区域附近显示 CNY 和 USD 余额。
- 通过 DeepSeek 官方余额接口获取数据。
- API Key 只在服务端使用,浏览器只接收规范化后的余额数据。
- 每 60 秒自动刷新一次余额。
- 加载中、没有余额或请求失败时显示
--。 - 支持直接从 GitHub 仓库安装。
环境要求
- DeepSeek Harness
>=0.1.0-rc.7 webprofile- 已配置的
DEEPSEEK_API_KEY
安装
直接从 GitHub 安装
dsh plugin --profile web add github:eka3os/dsh-balance
安装完成后重新启动 Web profile:
dsh web
dsh plugin 会将包安装到指定 profile,并根据本包声明的 dsh.bundle.patch 自动将其激活为 profile bundle。
配置
插件使用 DEEPSEEK_API_KEY 作为凭据引用。建议在 DeepSeek Harness 的凭据/设置界面中配置 API Key。也可以在启动时通过环境变量提供,仅对本次运行生效:
DEEPSEEK_API_KEY=sk-your-key dsh web
如果使用 DSH 的本地凭据文件,可以将密钥写入 $DSH_HOME/.credentials.yaml:
DEEPSEEK_API_KEY: sk-your-key
请勿将 API Key 或凭据文件提交到 Git 仓库。
工作原理
- Host 插件注册
GET /api/dsh-balance路由。 - 路由通过 DSH credentials 服务解析
DEEPSEEK_API_KEY。 - Host 使用服务端 Bearer Token 请求
https://api.deepseek.com/user/balance。 - Client 插件将返回的 CNY/USD 余额渲染到侧边栏底部。
- 侧边栏处于宽布局时,Client 每 60 秒重复请求一次。
API 接口
| 方法 | 路径 | 说明 |
|---|---|---|
GET、HEAD | /api/dsh-balance | 返回当前 DeepSeek API 余额。 |
成功响应示例:
{
"isAvailable": true,
"balances": [
{ "currency": "CNY", "totalBalance": "10.00" },
{ "currency": "USD", "totalBalance": "1.00" }
]
}
凭据缺失时返回 503;DeepSeek API 无法访问或返回失败状态时返回 502;不支持的方法返回 405。
GitHub 分发
本插件仅通过 GitHub 分发,不发布到 npm。将仓库推送到 GitHub,并确保已提交 lib/ 构建产物以及 package.json 中列出的包文件。
许可证
MIT
Versions
| Latest version | Published | Size |
|---|---|---|
| 0.1.0 | — | — |
Comments
Loading…
From the same category
by ccch1mneyyy
DSH 官方公众号收录的 TUI 补位插件:Claude Code 风,鲸鱼顶栏/实时状态/流式思考/双击 Esc 回滚/上下文进度+TPS。npm 一键装。 DSH official WeChat featured TUI plugin — Claude Code style: whale bar, live status, streaming thoughts, double-Esc rol
★ 4k
↓ 16.5k/wk
MIT
TypeScript
Oct 3, 2026
dsh plugin --profile terminal add @deepseek-harness-tui/dsh-tuiby strukto-ai
The World's First Virtual Terminal for AI Agents
★ 3.7k
↓ 344/wk
Apache-2.0
TypeScript
Oct 3, 2026
dsh plugin --profile agent add @struktoai/mirage-dshby bowenliang123
The best DeepSeek Harness plugin for context insight and management, with context dashboard / browser / sidebar and context command, for context statistics, composition, breakdown, evolution details,
★ 1.8k
↓ 38.5k/wk
Apache-2.0
TypeScript
Oct 3, 2026
dsh plugin --profile web add dsh-contextby huiliyi37
官方 DeepSeek Harness 的交互式终端 UI 插件:自研 ANSI 极简交互渲染、流式 Markdown/工具卡、16+ 主题、slash 命令与选择器、输入历史与本地偏好持久化、LSP 诊断、memory记忆,很丝滑的开发体验。
★ 282
↓ 560/wk
Apache-2.0
TypeScript
Sep 30, 2026
dsh plugin --profile terminal add @huiliyi37/dsh-tianshu-tuiby Hilbert-beinghappy
面向 DeepSeek Harness 的 Claude Code 风格终端界面,支持 Windows、macOS 与 Linux,兼容透明终端、VS Code 主题和自定义配色。
★ 197
↓ 108/wk
MIT
TypeScript
Oct 1, 2026
dsh plugin --profile web add seekttyby T-Auto
deepseek-harness Plugin Access and Implementation Standards / deepseek-harness交互生态插件规范与实施标准
★ 81
MIT
JavaScript
Oct 3, 2026