dsh-balance
Manifest validDeepSeek Harness Balance Query Plugin: View your DeepSeek account balance in the session using the /balance command. / DeepSeek account balance as the /balance command.
description: "dsh-balance: the /balance command shows the DeepSeek account balance inside a session."
dsh-balance
English | 中文
The /balance command for DeepSeek Harness: reads the DeepSeek account balance and answers in the session, without a browser panel or a settings page.
/balance
DeepSeek 账户余额(可用)
CNY 总余额 ¥293.58 · 充值 ¥293.58 · 赠送 ¥0.00
读取于 2026/9/18 13:20:41(刚刚)
What it does
- Registers
/balancewith the command registry. The answer is the command's own text, so it renders in the session that invoked it and never reaches the model. - Reads
GET {baseUrl}/user/balancewith the resolved API key and reports every funded currency, with the topped-up and granted parts of each. /balance refreshbypasses the cache.- The key is resolved per invocation: config
apiKey, then the credentials referenceapiKeyRef(DEEPSEEK_API_KEYby default —$DSH_HOME/.credentials.yamlor the process environment). A rotated key reaches the next invocation without a restart. - A failed refresh still shows the last successful reading and says so, instead of hiding a known balance behind a transient outage.
Install
# from GitHub
dsh plugin --profile web add github:DWJZ/dsh-balance
# local development (the profile links the checkout, so edits apply on restart)
dsh plugin --profile web add link:/path/to/dsh-balance
Configuration
Optional; write it into $DSH_HOME/profiles/<profile>/cordis.patch.yml:
- id: dsh-balance
config:
apiKey: '' # explicit key; empty means "use apiKeyRef"
apiKeyRef: DEEPSEEK_API_KEY # credentials / environment reference
baseUrl: https://api.deepseek.com
timeoutMs: 10000
cacheMs: 30000 # how long one reading answers later calls
An unusable value (a non-string reference, a timeout below one second) fails loud at load instead of being silently replaced.
Test
node test/smoke.mjs
Drives the handler against a stubbed platform API: success formatting, the cache and /balance refresh, a missing key, HTTP 401, a transport failure, the stale-reading fallback, and the zero-balance currency rule.
License
Comments
Loading…
From the same category
DeepSeek Harness plugin for Reactive Resume: bridges your resumes and job applications into a Harness session over MCP.
★ 41.7k
↓ 121/wk
MIT
Aug 24, 2026
dsh plugin --profile web add dsh-plugin-reactive-resumeby dsh-market
The plugin market inside DeepSeek Harness — browse, search, one-click install · DSH 可视化插件市场
★ 11.6k
↓ 321.4k/wk
MIT
TypeScript
Aug 25, 2026
dsh plugin --profile web add dshmarketby Tencent
Let AI agents use your real, logged-in browser without interrupting your work. CLI + extension for browser automation across any shell-capable AI agent.
★ 8.6k
↓ 15.4k/wk
MIT
TypeScript
Aug 25, 2026
dsh plugin --profile terminal add @wxg-prc-cpg/browser-skill-dsh-pluginby superdesigndev
OpenRouter for agent tools. Join community here: https://discord.gg/6mQYYfFMAn
★ 7.8k
NOASSERTION
Python
Aug 25, 2026
dsh plugin --profile web add treg-dshby yjh051108
dsh-routing-suite — injector + router-standard kit: install the runtime injector first, then the task-aware reasoning-mode router preset (measured P1-P23).
★ 7k
MIT
JavaScript
Aug 24, 2026
dsh plugin --profile web add @dsh-external/dsh-super-injectorby Q00
Agent OS: the agent gets smarter on its own. We just hold the line: Interview-gated, staged evaluation, budgeted evolution loop. MCP server, 14 runtimes: Claude Code, Codex CLI, Gemini CLI, OpenCode,
★ 6.2k
MIT
Python
Aug 25, 2026