Per-session and daily API cost, budget with usage %, official balance, history dashboard, and one-click official price sync with peak/off-peak pricing.
Install
# from npm (prebuilt)
dsh plugin --profile web add dsh-cost-meter
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:Han-1413141/dsh-cost-meter
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
Track costs and tokens by conversation, model and call. View account balances, subscription quotas and budgets together, with separate API charges and Plan equivalents, multi-provider pricing, peak/off-peak alerts, and configurable sidebar and composer displays.
Installation
Requires Node.js ≥ 20, DSH 0.2.0 or later, and pnpm available to DSH. See host compatibility.
dsh plugin --profile web add dsh-cost-meter
Restart dsh web after installation or updates. Desktop uses its bundled CLI and the desktop profile; follow the Desktop guide.
The PowerShell installer checks pnpm and Git and uses the web profile by default:
irm https://raw.githubusercontent.com/Han-1413141/dsh-cost-meter/v1.9.64/install.ps1 | iex
Install a pinned Git tag:
dsh plugin --profile web add github:Han-1413141/dsh-cost-meter#v1.9.64
See installation and updates for uninstalling or installing without Git.
Current release v1.9.64: release notes · troubleshooting
Feature overview
- Conversation and call costs: Cost entries in the composer, header and each turn. Inspect rates, tokens, recorded inputs and tool results, including parent/subagent cost attribution.
- Statistics and exports: Filter by date, provider and model; inspect trends, rankings, cache hit rates and token heatmaps. Export one or all retained conversations, and view local-model API-equivalent costs separately.
- Quotas and balances: Codex / ChatGPT, OpenCode Go, MiniMax, Claude, GLM, Kimi, Qianwen, MiMo, OpenDesign and other plans, plus CLIProxyAPI multi-account quotas and custom HTTP balance sources.
- Multi-provider pricing: Automatic model matching, editable rates and multipliers, and peak/off-peak tiers. Sync DeepSeek official prices and the OpenRouter catalog; separate API charges from Plan equivalents.
- Budgets and pricing alerts: Daily, monthly, cumulative or custom-date budgets. Peak/off-peak schedules and countdowns, with popup and system notifications before a change.
- Display and history: Configure sidebar cards, composer entries, quota strips and turn costs. Chinese/English UI, dark themes and mobile layouts; historical imports, retention and storage controls.
See features and screenshots for entry points and model and plan support for providers and credentials.
Screenshots & walkthrough
| Cost trends and model ranking | Conversation cost distribution |
|---|---|
![]() |
![]() |
| Subscription quotas and balances | Display settings and interactive preview |
|---|---|
![]() |
![]() |
Select an image for full resolution. More views: call details, prices, history, dark themes and mobile.
Documentation
| Topic | Guides |
|---|---|
| Setup and use | Install, update and uninstall · Troubleshooting · Display settings |
| Statistics and billing | Billing rules · Statistics and details · Models and plans · Peak schedules |
| Balances and quotas | Credentials · Custom balances · Gateway quotas · Plan estimates |
| History and storage | Retention and cleanup · Repricing · External usage · Ledger recovery |
| Development | Architecture and development · Contributing · Host compatibility |
| Releases | Update history · CHANGELOG |
Community
Open an issue with plugin and host versions, reproduction steps and relevant logs. The WeChat group is available for usage questions and feature discussions.
Contributors
Thanks to everyone who contributes reports, ideas, documentation and code.
Star History
License
MIT © 2026 dsh-cost-meter contributors
Links
More in this category
bowenliang123/dsh-context★ 4963
DSH context insight panel: Context dashboard + /context command + Context browser — one-stop context lifecycle management with categorized composition, content details, evolution trends, compaction/injection events, and stats.
wssfk12138/dsh-damage-pulse★ 290
Tracks DeepSeek token usage, per-call and session costs, and account balance with cache-aware charge animations in the DSH Web UI.
zh667/TokenLedger★ 204
Sidebar usage panel that attributes tokens to the relay site that served each request, read from your existing provider config: today/month/all-time totals, per-site and per-model breakdowns, a year activity heatmap, and New API / Sub2API / DeepSeek balances.
Ychris12138/dsh-usage-stats★ 188
Multi-provider usage dashboard with provider/model token breakdowns, calendar drill-downs, account balances, and OpenCode Go / Z.ai subscription quota tracking.
Mt-Youya/dsh-plugins#sessions-insight★ 126
Browse Claude Code, DSH and Codex session logs by working directory, with per-turn context composition, token usage, compaction markers and cost estimates.
PolinniZhong/dsh-personal-center★ 115
Personal center for DeepSeek Harness: cross-session usage statistics with per-provider and per-model breakdown (auto-discovers configured models), per-model cost estimation, global custom instructions, a data-driven desktop pet with bitmap & vector skins, and a conversation status overview, all local and offline.




Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.