Development & Runtime

dsh-balance-plugin

francis-xavier-code/dsh-balance-plugin · ★ 64

francis-xavier-code

DeepSeek Harness plugin for balance monitoring, the official recharge entry, Miyu-style usage statistics, and third-party plugin management.

License
MIT
Added
2026-08-23
Maintenance
active
Install kind
github

No manifest check is available; listing does not imply compatibility or security review.

安装

dsh plugin --profile web add github:francis-xavier-code/dsh-balance-plugin

GitHub 源码安装:首次需按提示配置 allowBuilds 构建授权后重试

For install and environment setup, plus plugin development tutorials, see DSH community docs ↗

README

Source README · body: en · Read Chinese README

Table of contents
  1. 💰 DeepSeek Balance Monitor & Usage Stats
  2. ✨ Features
  3. 📥 Install
  4. Prerequisites
  5. One-click install (recommended)
  6. Update the plugin
  7. Uninstall the plugin
  8. 🖼 Screenshots
  9. ❓ FAQ
  10. 📖 Docs
  11. 💬 Community
  12. 👥 Contributors
  13. 📄 License

💰 DeepSeek Balance Monitor & Usage Stats

A DeepSeek Harness (DSH) plugin — balance monitoring · official top-up link · Miyu-style usage statistics · third-party plugin manager

license platform version

✨ Features · 📥 Install · 🖼 Screenshots · ❓ FAQ · 📖 Docs · 🌐 中文


✨ Features

Module Capability
Balance monitoring Monitors DeepSeek API balance (CNY / USD dual balance pool) with parallel multi-account queries; auto-reads the DSH credential DEEPSEEK_API_KEY — no manual entry needed
Low-balance alerts Independent CNY / USD thresholds (default ¥10 / $2, configurable); the balance bar turns red when below threshold
One-click top-up Jumps straight to the official DeepSeek top-up page platform.deepseek.com/top_up, plus a usage-details page link
Usage statistics 1:1 recreation of the Miyu WebUI usage page: stat tiles / GitHub-contribution-style usage calendar / three-segment stacked trend bar chart / model consumption donut chart with detail table / recent 50 call records
Performance metrics Turns · steps · LLM duration · tool-call duration · avg first-token latency · tok/s · cache hit rate
Third-party plugin manager Lists unofficial (non-@deepseek-ai) web plugins: package name / local path / Bundle rev / dependencies, with a one-click "Open Directory" to locate source code
Model tool Registers the query_api_quota tool — just ask "How much DeepSeek balance is left?" and get a balance summary
Persistent settings Config auto-saves to config.json in the plugin directory and restores after restart
One-click update Check for updates and update directly in the DSH plugin panel — no manual operations needed

📥 Install

Prerequisites

  • DeepSeek Harness installed and running
  • (Optional) DeepSeek API Key — get one at platform.deepseek.com; if DEEPSEEK_API_KEY is already configured on this machine, the plugin re-reads it on every poll — changing the key needs no restart

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

Restart DeepSeek Harness after installation — three icon buttons appear on the right of the input box. Use DSH_PROFILE=<name> to target another profile.

Update the plugin

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

# Windows PowerShell
irm https://raw.githubusercontent.com/yxxbc/dsh-balance-plugin/main/install.ps1 | iex
# Then in PowerShell run: $env:UPDATE='1'; irm https://raw.githubusercontent.com/yxxbc/dsh-balance-plugin/main/install.ps1 | iex

Or click "Check Update" → "Update" in the DSH plugin panel (recommended).

Uninstall the plugin

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

# Windows PowerShell
irm https://raw.githubusercontent.com/yxxbc/dsh-balance-plugin/main/uninstall.ps1 | iex

🖼 Screenshots

Screenshot Description
Input preview Three icon entries on the right of the input toolbar plus a persistent balance bar below
Wallet settings Balance monitoring panel: balance table, low-balance alerts, account config, thresholds & refresh interval, top-up entry
Usage stats top Usage page top: range switcher, stat tiles, live performance metric bar, GitHub-style usage calendar
Usage stats bottom Usage page bottom: trend bar chart, model consumption details, call record details
Plugin manager Third-party plugin manager: stat badges, plugin list, "Open Directory" action

❓ FAQ

Q: Are my settings preserved after restart? A: Settings are automatically persisted to config.json in the plugin directory and restore after restart.

Q: Will the plugin still be there after a restart? A: Yes — static plugins are installed persistently and survive restarts. The auto-read DEEPSEEK_API_KEY account needs no reconfiguration and restores automatically after restart.

Q: I can't see the entry button at the bottom of the sidebar? A: The DSH sidebar bottom slot is exclusively occupied by the official Cordis panel plugin. This plugin's entry is fixed on the right of the input toolbar and does not depend on that slot.

Q: Will my Key leak? A: No. Keys are saved only in config.json in the plugin directory on your machine and the UI only shows masked values; neither the source code nor the README contains any secrets.

Q: Why not use dsh plugin add dsh-balance-plugin? A: A third party owns a same-named package on npm (dsh-balance-plugin@0.1.0), so the bare name would install the wrong one. Use the one-click script or the github: source.

See the full FAQ for more questions.


📖 Docs

Document Description
Configuration Detailed settings, persistence, update methods
Architecture Dual-face architecture, RPC routes, persistence
FAQ Full FAQ, troubleshooting, installation issues
Contributing How to contribute

💬 Community


👥 Contributors

Made with contrib.rocks.


📄 License

MIT © 2026 Black Cat (yxxbc)