Introduction

When running agents with DeepSeek Harness (DSH), API balances and local usage often require switching to a browser or third-party dashboard to check. DSH natively supports Cordis dynamic plugins, and the community directory SkillHub also features extensions tailored for networked scenarios. yxxbc/dsh-balance-plugin (Category: Networking Tools) consolidates balance checking, official top-up entry, usage statistics, and third-party plugin listings into the DSH interface. Maintained by yxxbc, it is currently at version 1.3.0, licensed under MIT, and has approximately 55 stars on GitHub.

This article introduces the plugin’s positioning, core capabilities, installation steps, and typical usage.

What It Is

dsh-balance-plugin is a dynamic Cordis plugin for DSH that provides three icon entries on the right side of the input box toolbar and a persistent balance bar below. It automatically reads the local DSH credential DEEPSEEK_API_KEY, eliminating the need to re-enter the key in the interface. Configuration is saved to the plugin directory’s config.json and restored after a restart.

Core Features

Balance Monitoring and Alerts

  • Queries DeepSeek API balances, supporting dual CNY/USD balance pools, with parallel queries for multiple accounts.
  • Configurable low-balance thresholds for CNY and USD (default ¥10 / $2), with the balance bar turning red when below the threshold.
  • Provides direct access to the official top-up page platform.deepseek.com/top_up and a link to the usage details page.

Usage Statistics

The usage page layout is inspired by the Miyu WebUI usage page, featuring:

  • Statistical tiles and a GitHub contribution-style usage calendar;
  • A three-segment stacked trend bar chart;
  • Model consumption doughnut chart and detail table;
  • The last 50 call records.

Performance metrics include rounds, steps, LLM duration, tool call duration, average first-token latency, tok/s, and cache hit rate.

Third-Party Plugin Management

Lists non-official (non-@deepseek-ai) web plugins: package name, local path, bundle revision, and dependencies. Supports one-click “Open Directory” to locate source code.

Model Tool

Registers the query_api_quota tool. In a conversation, simply ask “How much DeepSeek balance is left?” to receive a balance summary.

Updates and Persistence

Updates can be checked and applied with one click from within the plugin panel; alternatively, use the installation script with UPDATE=1 to update. Settings are persisted to config.json.

Installation and Enabling

Prerequisites

  1. DeepSeek Harness is installed and running.
  2. (Optional) A DeepSeek API Key. If DEEPSEEK_API_KEY is already configured locally, the plugin reads it automatically upon startup.

One-Click Installation

macOS / Linux:

curl -fsSL https://raw.githubusercontent.com/yxxbc/dsh-balance-plugin/main/install.sh | bash

Windows (PowerShell):

irm https://raw.githubusercontent.com/yxxbc/dsh-balance-plugin/main/install.ps1 | iex

After installation, restart DeepSeek Harness. The appearance of three icon buttons to the right of the input box indicates successful activation. You can specify another profile using DSH_PROFILE=<name>.

Updating

# macOS / Linux
curl -fsSL https://raw.githubusercontent.com/yxxbc/dsh-balance-plugin/main/install.sh | UPDATE=1 bash

Or click “Check for Updates” → “Update” within the DSH panel.

Uninstallation

# macOS / Linux
curl -fsSL https://raw.githubusercontent.com/yxxbc/dsh-balance-plugin/main/uninstall.sh | bash

Note: The README states that a same-named package dsh-balance-plugin@0.1.0 exists on npm. Using the bare package name dsh plugin add dsh-balance-plugin might install the wrong version. Please use the one-click scripts or install via the github: source.

Typical Usage

  1. View Balance: After restarting DSH, check the persistent balance bar below the input box; or click the wallet icon to enter the balance monitoring panel to configure thresholds and refresh intervals.
  2. Check Usage: Click the usage statistics icon, switch time ranges, and view the calendar, trend charts, and model consumption details.
  3. Query Balance in Conversation: Ask about the balance in an agent conversation; query_api_quota will return a summary.
  4. Manage Local Third-Party Plugins: Open the third-party plugin management page to verify package names and paths. Use “Open Directory” when source code modification is needed.

The entry point is fixed at the right side of the input box toolbar. The bottom slot in the DSH sidebar may be occupied by official Cordis panel plugins; this plugin does not rely on that slot.

Use Cases and Considerations

Who It’s For:

  • Those who frequently run agents in DSH and need to monitor CNY/USD balances and local usage at any time;
  • Those who have installed multiple unofficial DSH web plugins locally and need to consolidate path and dependency information.

Before Use:

  • The plugin runs with the permissions of the current DSH process. It’s recommended to review the source code and the MIT license before installation.
  • The API Key is stored locally in the plugin directory’s config.json; the interface only displays a masked version. The README states that the source code and documentation do not contain the key.
  • The SkillHub directory page has no official affiliation with DeepSeek / High-Flyer; it is part of the community plugin ecosystem.

Links