Introduction

Under the plugin architecture of DeepSeek Harness (dsh), the web GUI can extend page capabilities via plugins. When using dsh web, information such as the remaining DeepSeek API quota, daily and monthly usage, and current session costs is usually not displayed in a single view.

jiangli07/dsh-deepseek-quota-bar is a web plugin that converts this information into a floating card in the bottom-right corner. It uses a health bar to display the ratio of remaining balance to the balance at the start of the month, and shows daily and monthly usage, current session costs, and peak/valley period reminders.

Below, we introduce its positioning, features, installation, configuration, and usage notes.

What is this

dsh-deepseek-quota-bar is a DeepSeek API quota health bar plugin for the DeepSeek Harness (dsh) web GUI. The maintainer is jiangli07, and the license is MIT.

It addresses the issue of viewing DeepSeek API quota and usage within the dsh web page: displaying the balance ratio, daily/monthly usage, and current session cost in the bottom-right corner, and providing controls related to peak/valley periods and interface display.

Core Features

Quota Health Bar

  • Display the ratio of remaining DeepSeek API balance to the balance at the start of the month using a health bar.
  • Health bar color thresholds:
  • ≥50% displays green
  • ≥20% displays orange
  • <20% displays red

Daily and Monthly Usage

  • After configuring DEEPSEEK_PLATFORM_TOKEN, official precise data is used.
  • When not configured, usage is estimated using the balance difference.
  • Estimated states and start-of-month balance snapshots are persisted in:
~/.dsh/storages/deepseek-quota-bar.json

Current Session Cost

  • Price the current session logs according to the official price list.
  • Includes history before installation.

Peak and Valley Period Reminders

  • Display a peak indicator.
  • Display a countdown to the next period switch.
  • Display the current model unit price.
  • Support clicking Flash / Pro to switch.

Interface Controls

  • The card is draggable, and position is persisted to localStorage.
  • Can be collapsed into a mini card showing only the health bar.
  • Adjustable opacity range is 0-100%, and it is persisted.
  • Follows light/dark themes.
  • Balance auto-refreshes every 60 seconds, manual refresh is also supported.

Installation and Activation

Package Name Installation

Execute:

dsh plugin --profile web add dsh-deepseek-quota-bar

After installation, restart dsh web:

dsh web

After opening the page, hard refresh:

Ctrl+Shift+R

A card appears in the bottom-right corner.

Local Development Installation

git clone https://github.com/jiangli07/dsh-deepseek-quota-bar.git
cd dsh-deepseek-quota-bar
dsh plugin --profile web add .

If the client implementation is modified:

lib/client.js

You need to restart dsh web, wait for the bundle entry hash to regenerate, then hard refresh the page.

Typical Usage

Configure Credentials

Required credentials:

DEEPSEEK_API_KEY

Optional credentials for official precise usage:

DEEPSEEK_PLATFORM_TOKEN

Configure credentials to:

~/.dsh/.credentials.yaml

No need to restart after configuration; it takes effect on the next refresh.

View Quota and Usage

After installation and configuration, open the dsh web page, and the card will display:

  • Health bar corresponding to the ratio of remaining balance to start-of-month balance.
  • Daily and monthly usage.
  • Current session cost.
  • Peak and valley period reminders.
  • Interface controls such as opacity, drag, and collapse.

Applicable Scenarios and Notes

  • Suitable for developers using the DeepSeek API within the dsh web GUI who want to view quota, usage, and session costs within the page.
  • If only approximate usage is needed, DEEPSEEK_PLATFORM_TOKEN does not need to be configured; in this case, daily/monthly usage will be estimated using the balance difference.
  • The repository is hosted on GitHub with an MIT license; do not misunderstand it as the official DeepSeek app store.
  • The plugin runs with the permissions of the current dsh process. It is recommended to check the source code, dependencies, and license before installing.
  • License information: MIT. Forked from yingjunnan/dsh-deepseek-quota (MIT); Pricing engine reference dsh-web-billing (MIT).

Conclusion

dsh-deepseek-quota-bar concentrates DeepSeek API quota, usage, and current session costs into the dsh web page, making it suitable as a lightweight monitoring component during development.

Repository address:

https://github.com/jiangli07/dsh-deepseek-quota-bar