DeepSeek Harness plugin

dsh-balance-pill

DeepSeek balance floating widget for the DeepSeek Harness (DSH) web GUI: a draggable, collapsible pill showing your official API account balance, with automatic fallback to the harness's

Jump to install

Source facts

Repository
zypchloe-del/dsh-balance-pill
Latest update
Aug 20, 2026
Category
Models & Providers
GitHub stars
1
Format
plugin
Catalog evidence
Upstream dsh.bundle evidence
Evidence path
package.json#dsh.bundle
Checked against
0.1.0-rc.8
Upstream check date
2026-08-20

This evidence comes from the upstream catalog. This site has not installed, run, or security-reviewed the plugin.

Install

Start with a prompt that asks an agent to review the GitHub repository and source. Switch to the command if you want to install it yourself.

Copy this prompt into DSH, Codex, or another agent and ask it to review the GitHub repository and source first.

Do not install or run any commands yet. Read this plugin's GitHub repository, README, and relevant source code. Then answer the questions below clearly and directly so I can decide whether it fits my needs:

1. What is this plugin, and what problem does it solve?
2. Who is it for, and what are its typical use cases?
3. How is it used after installation? Include one minimal example.
4. What known limitations or privacy, security, compatibility, or maintenance risks does it have?
5. Give a clear recommendation: recommend, conditionally recommend, or do not recommend, with reasons.

Distinguish statements documented by the repository, inferences from source code, and unknowns. If evidence is insufficient, say so explicitly. Do not guess or simply repeat the README.

GitHub: https://github.com/zypchloe-del/dsh-balance-pill
Plugin: dsh-balance-pill
Author: zypchloe-del

Check the source files

Read the README and other files from this plugin directory before installing.

File explorer4 files
README.en.mdSource · read only
README language

dsh-balance-pill

🌐 中文

> A DeepSeek balance floating pill for DeepSeek Harness (DSH): a draggable, collapsible frosted-glass widget pinned bottom-right that shows your official API account balance in real time — and reuses the harness's DEEPSEEK_API_KEY automatically when you haven't configured a key of its own.

![license](LICENSE) <!-- Uncomment after publishing to npm: ![npm version](https://www.npmjs.com/package/dsh-balance-pill) -->

📸 Screenshots

Pill (default, out of the way)Expanded
![pill](./screenshots/pill.png)![card](./screenshots/card.png)

Why

While using DSH you constantly want a quick glance at your DeepSeek balance, but switching to the website is annoying. This plugin turns the balance into a small always-on pill in the bottom-right corner: glance at it to see how much is left, click it for details, drag it wherever feels right.

Features

  • Live balance: queries the official API GET /user/balance and shows total balance, availability, and top-up / granted breakdown (¥ for CNY, $ for USD).
  • Auto key reuse: prefers a key saved inside the plugin; otherwise read-only falls back to the harness's DEEPSEEK_API_KEY (never writes to or clears it).
  • Isolated credential: a key you type in the plugin is stored under DSH_BALANCE_PILL_KEY, separate from the harness's own model key.
  • Collapsible pill: collapsed by default into a small bottom-right pill (status dot + balance); click to expand, keeping the conversation area clear.
  • Draggable: both the pill and the card can be dragged anywhere; position persists across expand / collapse.
  • Auto refresh: re-queries every 5 minutes, with manual refresh available.
  • Frosted glass: 16px background blur + translucent background, auto light/dark via prefers-color-scheme.
  • i18n: UI text follows the DSH language setting (Chinese / English; falls back to Chinese).
  • Cross-platform: the Host resolves the local curl via resolveExecutable("curl") (no hardcoded curl.exe).
  • Secure: all HTTP routes accept loopback (127.0.0.1 / ::1) requests only.

Quick Start

Option 1: install straight from GitHub (no npm needed)

dsh plugin --profile web add github:zypchloe-del/dsh-balance-pill

Option 2: install from npm (after publishing)

dsh plugin --profile web add dsh-balance-pill

After installing, refresh the page and the pill appears in the bottom-right corner:

  • If DSH already has DeepSeek configured (DEEPSEEK_API_KEY) → the balance shows immediately;
  • Otherwise click the pill to expand → click → enter your API key → Save.

> <profile>: use desktop for the desktop app, web for the web GUI; omitting --profile targets the default profile.

Configure API Key

MethodDescription
Auto reuse (recommended)Auto-detected when DSH already has DEEPSEEK_API_KEY (env var or credential file) — nothing to fill in
Fill in the widgetExpand → ⚙ → enter key → Save, stored under DSH_BALANCE_PILL_KEY in ~/.dsh/.credentials.yaml

> A key saved in the plugin takes priority over the harness key; "Clear" only removes the plugin's own key, never the harness key.

Uninstall

dsh plugin --profile web remove dsh-balance-pill

Structure

dsh-balance-pill/
├── lib/
│   ├── index.js    # Host: /api/dsh-balance-pill/* routes (balance query, key status/save/clear)
│   └── client.js   # Client: pill + card UI, drag, collapse, auto refresh, i18n, frosted glass
├── cordis.patch.yml  # bundle patch (entry id: dsh-balance-pill)
├── package.json
├── README.md / README.en.md
└── LICENSE

Implementation Notes

  • Host (lib/index.js): dependency-free ESM; registers loopback-only routes via webServer, calls the official API through subprocess + local curl, and resolves keys through credentials (own ref → harness ref fallback).
  • Client (lib/client.js): mounted via window.__ModuleLoader__.load, attached to a low-level document.body container (z-index 2) instead of shell.overlay to stay compatible with different host overlay stacking; UI text is registered/bound through the locale service.
  • Official balance response (/user/balance):

``json { "is_available": true, "balance_infos": [{ "currency": "CNY", "total_balance": "110.00", "granted_balance": "10.00", "topped_up_balance": "100.00" }] } ``

FAQ

Q: Will my key leak? No. The key is stored only locally in ~/.dsh/.credentials.yaml; balance queries go only to the official DeepSeek API; HTTP routes accept loopback requests only.

Q: Does it conflict with the harness's own key? No. The plugin prefers its own DSH_BALANCE_PILL_KEY, only read-only reuses the harness key when that is empty, and never writes back to or clears the latter.

Q: How do I pin a position? Drag it where you want and release; the position is kept for the current session (across expand / collapse).

Related

  • dsh-wallpaper — a wallpaper plugin for the DSH web GUI: upload a custom wallpaper, tune transparency, fill the whole background.

License

[MIT](LICENSE)