dsh-token-ledger-pro
Run the following command in DeepSeek Harness:
dsh plugin install bjzkhy/dsh-token-ledger-pro
Paste the following prompt into your AI chat to install this plugin:
Run dsh plugin install bjzkhy/dsh-token-ledger-pro in the DeepSeek Harness terminal; the full source code lives at https://github.com/bjzkhy/dsh-token-ledger-pro. After installation, restart DSH Web and hard-refresh the browser (Ctrl+F5) to see the plugin in action.
About this plugin
Anyone who runs LLM sessions through DeepSeek Harness knows the quiet anxiety of an opaque token bill. dsh-token-ledger-pro merges the previously separate cost-meter and spend panels into a single-script plugin that pins a live status strip beside the input bar: current model, account balance, session cost, daily, monthly, and a colour-coded budget bar that shifts from green to orange to red as you cross alertThreshold.
Under the hood the plugin captures token usage from every DSH session event and prices it against a built-in catalogue spanning 16 vendors and 136 models, with a four-level matching strategy (exact, prefix, vendor default, cross-vendor global). DeepSeek peak/off-peak pricing, separate cache-read and cache-write rates, and graceful fallback with a visible "unpriced" badge for models outside the catalogue are all handled. Balance lookups call official APIs for DeepSeek, OpenAI, Anthropic, Kimi, Zhipu, Volcano Ark, Aliyun and more, or you can point a custom HTTP endpoint with JSONPath extraction at any provider in between; results are cached for one minute by default.
Aggregated session, daily, and monthly figures plus the last 2,000 line items are persisted via atomic JSON writes, so nothing is lost across restarts. An optional priceSyncUrl lets you overlay a remote pricing feed on top of the built-in directory. The plugin is aimed at solo developers and small teams who juggle several models and want a glanceable, always-present view of spend and balance without spinning up an extra service.
Use Cases
- Track real-time token spend while switching between multiple models
- Review cumulative costs by session, daily, and monthly for month-end reconciliation
- Get early warnings via the budget bar and balance panel before credits run out
Best For
- Solo developers making heavy multi-model API calls through DeepSeek Harness
- Team leads who need to monitor and control token budgets
- Engineers juggling several LLM vendors who want a unified view of balance and spend
Related Plugins
A service-oriented sidebar framework for DSH, offering a full workbench with file explorer, embedded browser, real terminal, Git panel, and extensible plugin services.
A beautiful, practical Claude Code-style TUI plugin with pixel whale top bar, flowing glow title, real-time status line, streaming thought expansion, time rewind, context progress bar and TPS gauge — zero core changes.
The plugin market for DeepSeek Harness: browse/search/one-click install community plugins and themes, with updates, backup/restore, hot disable, diagnostics, and AI fix.
A persistent whale widget on the DSH web UI that shows DeepSeek balance, today's usage, and per-turn cost, with drag-and-snap and sound effects.