Skip to content

stevenx65/dsh-balance-plugin

60Last commit Aug 14, 2026

dsh-balance-plugin DSH plugin

This plugin adds a balance button at the bottom of the DSH web sidebar (port 3080). It shows your DeepSeek API balance and token usage statistics, with a Today/All-time toggle. It reuses dsh's credentials and reads session logs to aggregate data.

How to install the dsh-balance-plugin DSH plugin

dsh plugin --profile web add dsh-balance-plugin

Copying does not run this command. Review the repository and version before installing the dsh-balance-plugin DSH plugin.

dsh-balance-plugin DSH plugin data source

dsh-balance-plugin DSH plugin snapshot date: Aug 16, 2026

discovered

What the dsh-balance-plugin DSH plugin can do

  • Shows DeepSeek API balance via official GET /user/balance endpoint
  • Displays token usage: uncached input, cache read, output, and model call count
  • Supports Today (Beijing time) and All-time toggle
  • Auto-adapts to light/dark theme
  • Reuses dsh credentials, no manual key entry needed

Where the dsh-balance-plugin DSH plugin fits

  • Monitor DeepSeek API balance to avoid running out of credits
  • Track daily token consumption for cost management
  • Analyze model call patterns and usage trends

Who the dsh-balance-plugin DSH plugin is for

  • Developers using DeepSeek Harness (dsh) web profile
  • Users who need to manage DeepSeek API costs and usage

dsh-balance-plugin DSH plugin limitations

  • Only supports 'deepseek-official' provider, ignores other providers
  • Requires zstd CLI to decompress session logs
  • Depends on dsh 0.1.0-rc.6 or later for browser peer dependency
  • Only available for the web platform (port 3080)

dsh-balance-plugin DSH plugin: from the repository README

Quoted from the stevenx65/dsh-balance-plugin README, the upstream source of the dsh-balance-plugin DSH plugin. Copyright remains with the original authors.

A DeepSeek Harness (dsh) web plugin: shows **DeepSeek API balance** and **token usage** at the bottom of the web sidebar (port 3080), with a **Today / All-time** toggle, filtered by provider (only `deepseek-official`, ignoring other vendors). ## Features - 💰 Balance: calls DeepSeek's official `GET /user/balance`, reusing dsh's credentials (`~/.dsh/.credentials.yaml`) — no manual key entry - 📊 Token usage: reads dsh session logs (`session.jsonl.zstd`), aggregates by provider - Uncached input / cache read / output / model call count - 🔄 Today / All-time toggle: today (Beijing time) or full history - 🎨 Auto-adapts to light/dark theme ## Screenshot ![dsh-balance-plugin](docs/screenshot.png) ## Install (from the plugin market) ```sh dsh plugin --profile web add dsh-balance-plugin ``` Restart `dsh web`, then refresh the page — a balance button appears at the bottom of the sidebar. ## Architecture ``` Browser (3080 page) client.js ──fetch──▶ /dsh-balance/data?scope=today|all │ node side (index.js, inside the dsh process) ├── credentials.resolve("DEEPSEEK_API_KEY") ← reuses dsh's key ├── fetch(https://api.deepseek.com/user/balance) └──

Read the full READMERepository license: MIT

dsh-balance-plugin DSH plugin questions

How do I install dsh-balance-plugin?

Run `dsh plugin --profile web add dsh-balance-plugin` in your terminal, then restart `dsh web` and refresh the browser page. The plugin will appear as a button at the bottom of the sidebar.

How do I uninstall this plugin?

You can remove it by running `dsh plugin --profile web remove dsh-balance-plugin` and restarting `dsh web`. Alternatively, manually delete the plugin folder from `~/.dsh/profiles/web/node_modules/` and remove its entry from `cordis.patch.yml`.

Where does the data come from?

The balance data comes from DeepSeek's official API `/user/balance` using the credentials stored in `~/.dsh/.credentials.yaml`. The token usage data is read from your local dsh session logs (`session.jsonl.zstd` files) under `~/.dsh/sessions/`.

Does it support other providers like Azure or OpenAI?

No, this plugin currently only filters for the `deepseek-official` provider. It ignores all other providers in the session logs. If you use multiple providers, only usage from DeepSeek will be displayed.

Can I install it manually without the dsh plugin command?

Yes. Copy the files (index.js, client.js, cordis.patch.yml, package.json) into `~/.dsh/profiles/web/node_modules/dsh-balance-plugin/`, then add the plugin entry to `~/.dsh/profiles/web/cordis.patch.yml` and restart `dsh web`.