Introduction¶
When using multiple LLM providers in the DSH Web GUI, the common practice is to open each provider’s query page separately to check balances or quotas. GPIOX/dsh-api-balance is a plugin for the DeepSeek Harness (DSH) Web GUI that turns this information into draggable, resizable floating badges. Below is an introduction to its features, installation method, and notes.
What is this¶
It is a DSH plugin maintained by GPIOX, with the package name dsh-api-balance-badge and an MIT license. Its purpose is to display LLM API account balances or quotas in a floating manner within the DSH Web GUI.
Verified package.json information includes:
- Version:
1.6.6 - Package name:
dsh-api-balance-badge peerDependenciesrequirement:@deepseek-ai/cordis ^4.0.1
Core Features¶
- Display LLM API account balances in a floating manner within the DSH Web GUI.
- One badge per configured provider.
- Badges are draggable and can be resized from
70%to250%using the handle in the bottom-right corner. - Uses a frosted glass / acrylic visual style: semi-transparent neutral tones, blurred background, and thin borders.
- Text color adapts automatically based on the brightness of the content below the badge, sampling approximately every
1.5seconds. - Supports DeepSeek, Moonshot, OpenAI, OpenCode Go, and custom GET balance/quota endpoints.
- OpenCode Go displays rolling quotas for
5hours, weekly, and monthly, including used/remaining percentages and reset countdowns. - Clicking a badge refreshes all badges; data is refreshed by default every minute and can be configured down to
30seconds. - API keys are stored in the DSH credential service
~/.dsh/.credentials.yamland are not sent to the browser. Settings › API Balancecan be used to manage the provider list, keys, balance/quota details, badge visibility, and position reset.- Can be injected as a dynamic plugin via
cordis_defineandcordis_runwithout the need for building or restarting.
Installation and Enablement¶
First, run the installation command to add the plugin to the DSH web profile:
dsh plugin --profile web add https://github.com/GPIOX/dsh-api-balance/archive/refs/heads/main.tar.gz
After installation, restart DSH by stopping the dsh process and running it again, for example:
dsh web
Then refresh the page, open Settings › API Balance, select a provider, and save the key. You will then see the badges.
If you need to uninstall or roll back:
dsh plugin --profile web remove dsh-api-balance-badge
For local development, you can add a local path:
dsh plugin --profile web add link:/path/to/dsh-api-balance-badge
Typical Usage¶
Installing the Plugin¶
- Complete the installation above.
- Restart DSH and refresh the page.
- Open
Settings › API Balance. - Select a provider, paste the key, and save it.
- Drag or resize the badge in the page; clicking the badge refreshes all badges.
Quick Enable as a Dynamic Plugin¶
You can also inject the plugin as a dynamic plugin into the current DSH Web GUI session:
- Call
cordis_define, setkind: "new", use any 3-6 letter prefix, and pasteplugins/api-balance/host.jsandplugins/api-balance/client.jsascode.host/code.client. - Use
cordis_runto activate the returnedPackageand clickApproveon therun card. - Open
Settings › API Balance, select a provider, paste the key, and save it.
Note: Dynamic plugins exist in process memory rather than on disk and need to be redefined and reactivated after a DSH restart.
Use Cases and Notes¶
Suitable for users of the DSH Web GUI who need to check balances of multiple providers or OpenCode Go quotas simultaneously.
Notes before use:
- The plugin runs with the current DSH process permissions; check the source code and license before installing; this plugin is licensed under
MIT. - The browser can only see if a key has been configured; plain text API keys are not sent back to the page.
- OpenAI uses browser session tokens (
sess-...), which expire. - The installation command writes to the DSH profile, and the uninstall command uses the package name
dsh-api-balance-badge. - Dynamic plugins do not persist to disk and need to be redefined and reactivated after a DSH restart.
Conclusion¶
GPIOX/dsh-api-balance places API balance/quota checking inside the DSH Web GUI, reducing the steps of switching pages and manual queries. GitHub address:
https://github.com/GPIOX/dsh-api-balance