When developing with DeepSeek Harness (DSH) or calling services, it is often necessary to open a web page or third-party platform to check the balance or subscription quota of an API Key, which can interrupt the workflow. This article introduces a Web GUI plugin that keeps a usage card visible in the bottom-right corner of the DSH interface, addressing the need to check balances frequently.
Plugin Overview¶
The plugin is named loommii/dsh-provider-usage, maintained by loommii, and released under the MIT License. It is a Web GUI plugin whose core feature is to display AI service usage or balance as a floating card in the bottom-right corner of the DSH web interface. It supports multi-instance configuration and local Token statistics.
Core Features¶
- Persistent bottom-right floating usage card: Displays usage or balance in the bottom-right corner of the main interface. The card can be dragged.
- Automatic refresh: Data is automatically updated every 30 seconds; clicking ↻ on the card triggers a manual refresh.
- Multi-instance configuration: Supports configuring multiple providers at the same time (e.g., multiple accounts). Click the Logo or name on the card to switch views.
- Local Token statistics: Reads local session files for offline statistics without network access.
- Encrypted API Key storage: Keys are used only within the DSH process, are masked in the interface, and support AES-256 encryption.
Installation and Activation¶
Make sure DSH is installed before proceeding. Use the following command to install:
# Install
dsh plugin --profile web add github:loommii/dsh-provider-usage
After installation, restart dsh web to activate the plugin.
Typical Usage¶
- Open DSH settings and go to the “Usage Center”.
- Click “Providers” to add instances:
- OpenCode Go: Supports subscription queries.
- DeepSeek: Supports balance queries.
- Command Code: Supports subscription/balance queries. - After adding an account, return to the main interface. A usage card will appear in the bottom-right corner.
Notes¶
- Key security: Keys are used only within the DSH process, are masked in the interface, and are not uploaded or leaked.
- Local statistics: The local Token statistics feature does not access the network and only reads local session files.
Optional Configuration¶
The plugin supports several configuration options. Most default values are suitable for general use. To adjust them, write the settings into the profile bundle configuration (cordis.patch.yml or the settings page):
| Configuration | Default Value | Description |
|---|---|---|
timeoutMs |
15000 |
Outbound request timeout. |
subscriptionTimeoutMs |
5000 |
Command Code subscription endpoint timeout. |
maxSessions |
30 |
Maximum number of session files scanned for local Token statistics. |
sessionsDir |
$DSH_HOME/sessions |
Session directory used for local Token statistics. |
For more details, see the GitHub repository.