Introduction

When calling the DeepSeek API, there are a few things to manually verify repeatedly: how much balance is left, how much has been spent today, and whether the current time is peak pricing. The official platform can show this data, but you need to switch out of the development environment to see it separately. dsh-plugin-api-usage-monitor brings these three things into the DeepSeek Harness Web sidebar. Below is an introduction to its features, installation, and daily usage.

What is it

dsh-plugin-api-usage-monitor (version 1.9.0-rc.4) is an API usage, balance, and cost monitoring plugin designed for the DeepSeek Harness Web sidebar, maintained by ninedaywoo-web. It turns the API balance into a health bar, the daily consumption into a stance bar, and uses “Liangzi / Liangsheng” to indicate peak and off-peak periods.

Two points need to be clarified first: this is an unofficial community plugin and has no affiliation or endorsement with DeepSeek official; the amounts in the documentation screenshots are demo data. The code uses the MIT License.

Core Features

The capabilities provided by the plugin are as follows:

  • Balance Health Bar: Shows the ratio of the current balance to the maximum health limit; normal consumption only reduces health, it won’t mysteriously refill.
  • Daily Stance Bar: Shows the ratio of today’s consumption to the daily budget; recharging or refreshing the health bar won’t reset it to zero.
  • Peak/Valley Status: Displays “Liangzi” during peak hours and “Liangsheng” during off-peak hours. Clicking expands details on pricing periods, countdown, balance, and pricing buckets.
  • Recharge & Refresh: Click the potion bottle to go to the DeepSeek official recharge page; after recharging, you can manually refresh the health bar limit.
  • One-click Restart: Restart the current Harness from the sidebar; Windows uses a minimized supervision terminal, macOS uses a background supervisor.
  • State Persistence: Retains the health bar baseline and daily consumption status after restarting Harness.
  • API usage, daily cost, and token tracking
  • The status bar can be dragged to move temporarily; double-click to return to position.

Installation & Enablement

First, confirm the usage conditions:

  • DEEPSEEK_API_KEY is configured and DeepSeek Harness is running normally (0.1.0-rc.6 or compatible version)
  • Node.js ^22.19.0 or >=24.0.0

The plugin is not responsible for installing Harness, nor will it configure the API Key for Harness.

Then download the latest dsh-plugin-api-usage-monitor-*.tgz from the GitHub Releases page, run the following command to complete the installation, and replace the path with the file you downloaded:

dsh plugin --profile web add "/absolute/path/to/dsh-plugin-api-usage-monitor-1.9.0-rc.4.tgz"

This command adds the plugin to the web profile. Then run:

dsh web

After starting or restarting the Web profile, refresh the Harness webpage to see the sidebar component. The plugin will remain in the web profile and does not need to be reinstalled every time.

Regarding platform support: Windows 10/11 isolation installation tests have been completed; macOS is candidate support and still requires real device acceptance testing. The macOS restart supervisor runs in the background, writing supervision logs to $DSH_HOME/logs/dsh-balance-bar-supervisor.log.

Typical Usage

After the steps above, the plugin is running in the sidebar, and daily operations focus on the component itself:

  1. Click the potion bottle to expand “Go to Official Recharge” and “Refresh Health Bar” options. After recharging, click “Refresh Health Bar” so that the current balance becomes the new maximum health limit, and the daily stance bar won’t reset.
  2. Click “Liangzi / Liangsheng” to view the current peak/valley status, countdown, balance, today’s consumption, and pricing buckets.
  3. Click the circular arrow to restart the current Harness. The webpage will wait for the new Harness instance to actually start before restoring.
  4. Drag the status bar to move it temporarily; double-click to return it to position.

The Windows restart supervisor uses a minimized persistent terminal to avoid popping up PowerShell windows periodically.

State Storage & Uninstall

The plugin’s own health bar state is stored in $DSH_HOME/storages/balance-bar-day.json, which is also why the state persists after restarting Harness. The uninstall command is:

dsh plugin --profile web remove dsh-plugin-api-usage-monitor

Uninstalling does not delete Harness sessions. For a complete cleanup, manually delete the aforementioned state file after stopping Harness.

Privacy & Security

  • The API Key is only read by the Harness credential module on the host side and is not sent to the browser.
  • The plugin reads balance directly from the DeepSeek official balance interface without uploading telemetry data.
  • The restart interface only accepts same-origin requests from the local loopback address.
  • The installation package does not contain an installation script.

Applicable Scenarios & Notes

It is suitable for a type of DSH user who runs multiple sessions simultaneously, cares about peak/valley pricing and daily budgets, and wants to see the balance deduction at a glance while coding, rather than having to switch to the official platform to check the account every time.

Note two things before installation. First, the plugin runs with the permissions of the current dsh process. Before installing, check the source code and license: the repository provides three commands npm test, npm run preflight, npm pack --dry-run for development and verification. The code uses the MIT License, but character images are not within the MIT scope; see ASSET-NOTICE.md in the repository for details. Second, macOS support has not yet completed real device acceptance testing; currently, conclusions from Windows 10/11 tests are considered valid.

Summary

dsh-plugin-api-usage-monitor turns balance, daily consumption, and peak/valley periods into easily readable health bars and stance bars. Combined with recharge redirection and one-click restart, it reduces switching between the official platform and the development environment. DSH’s philosophy is “Everything is a Plugin,” and this type of sidebar component is an example of the community improving the user experience.

  • GitHub Repository: https://github.com/ninedaywoo-web/DSH-Plugin-API-Usage-Monitor
  • Community Directory Page (Independent site, no official affiliation with DeepSeek / HF): https://www.skillhub.cn/plugins/ninedaywoo-web/DSH-Plugin-API-Usage-Monitor