When developing agents with DeepSeek Harness (DSH), it is essential to monitor account balance and conversation costs in real time. The @javierni/balance-show plugin is built for the DSH Web GUI to address this need, providing an integrated dashboard that displays balance status and detailed token usage data.
Plugin Positioning¶
This is a client-side plugin maintained by JavierNier. It reads the DEEPSEEK_API_KEY configured in the current Harness to query the balance. It is not an official DeepSeek plugin and has no affiliation with the platform. The plugin runs entirely locally, does not include an API key, and only queries the installer’s own account.
Core Features¶
- Balance card: A floating card in the bottom-right corner displays the balance, with the text color indicating tiers (green for ≥¥50, orange for ¥10–50, and red for <¥10). It supports manual refresh and collapsing/expanding.
- Position memory and avoidance: Card positions are remembered independently for each conversation. During window resizing, the card follows and stays within the container. When panels such as the sidebar are open, it automatically shifts to the outside of the panel to avoid overlap.
- Current conversation statistics: Displays the current conversation’s tokens, cache hit rate, and cost in real time. Costs are bucketed by peak/off-peak pricing, and details can be viewed on hover.
- Technical features: Zero dependencies, no build steps, automatic update checks, and friendly error messages.
Installation and Activation¶
Install it using the official command:
dsh plugin --profile web add @javierni/balance-show
After installation, restart dsh web and refresh the browser page to see the card.
Configuration Requirements¶
After installation, ensure that the profile’s pnpm-workspace.yaml includes the following two items; otherwise, the plugin may fail to mount correctly or the update feature may not work:
# 1. 让 bundle 的 ESM 依赖能从 flat 目录解析
nodeLinker: hoisted
# 2. 排除 release-age 门禁,允许安装最新版本
minimumReleaseAgeExclude:
- '@javierni/*'
Typical Usage¶
After installation and restart, the card is displayed by default in the bottom-right corner. You can verify and update it using the following methods:
- Verify the balance: Use the following command to check the balance data returned by the API endpoint.
curl http://127.0.0.1:3080/balance
- Update the plugin: The version information is persistently displayed at the bottom of the card. When the text “online version vX.Y.Z” is shown in orange and is clickable, click it to run an update via local pnpm.
Notes¶
- This plugin is not an official DeepSeek plugin and has no affiliation with the platform.
- The plugin reads the
DEEPSEEK_API_KEYconfigured in the current Harness and does not include a key. - The pricing list is curated from official announcements. If the official pricing changes,
lib/pricing.jsmust be manually synchronized and updated. - Billing is a local estimate and is not the authoritative platform bill.
- Updates require pnpm or corepack to be available locally (on Windows, Node includes corepack).
- The plugin does not include an API key; it reads the balance of the account corresponding to the
DEEPSEEK_API_KEYconfigured in the current Harness.
For more details and source code, see: GitHub repository