feiyang-dev/dsh-usage-plugin

dsh-usage-plugin is a usage and cost tracker for DeepSeek Harness: it records every model call's tokens (input miss / cache hit / cache write / output / reasoning), prices them with DeepSeek's peak/off-peak table, and shows a Usage & Cost overview, a monthly calendar heatmap, a paginated cache-hit list and a Balance Query tab, plus CSV / JSON / PNG export.

dsh-usage-plugin is a usage and cost tracker for DeepSeek Harness: it records each model call's token usage and cache hits (input miss / cache hit / cache write / output / reasoning / finish reason) and computes cost with DeepSeek's peak/off-peak pricing (weekdays 09:00-12:00 and 14:00-18:00 Beijing time are peak; weekends bill entirely off-peak since 2026-08-23). A Usage & Cost overview shows a by-model table plus an by-provider x model drill-down with a grand total and date filtering; a Usage Calendar renders a monthly daily-usage heatmap coloured by cost or call count with per-day peak/off-peak totals; a Cache Hit List is paginated (100 per page) with filter ranges; a Balance Query tab queries the account balance from the configured DEEPSEEK_API_KEY; and each finished turn carries a Turn tokens button opening a two-layer Token Details popup. Records export to CSV / JSON / PNG long image (latest 2000), merge-import deduplicated by time, and the panel follows the harness language setting.

Usage & Billing ★ 37
View on GitHub ↗

Install

dsh plugin --profile web add @feiyang666/dsh-usage-plugin

Copied verbatim from the README's recommended command-line install block. The README also documents dsh plugin --profile headless add @feiyang666/dsh-usage-plugin and a manual pnpm/npm path. npm package @feiyang666/dsh-usage-plugin at 1.18.0 (registry check 2026-10-16; the registry repository field resolves back to this repo).

Compatibility

A Host + Client two-in-one package: the host half (Node-side Cordis plugin) records, bills, queries balance and exports, while the client half renders the panels and talks to /usage/api. It declares dsh.bundle.patch so dsh plugin add writes the package into the profile's dsh.profile.bundles layer with no manual config, and dsh.client so the web client auto-loads the browser panel. Records are written live to <session workspace>/dsh-usage/usage-records.json (cap 100000). The README is explicit that interrupted/failed/timed-out calls are recorded at 0 tokens and that the official console may show more, so the panel's figures are a local-truth view, not the console total.

Details

Alternatives

940842546/dsh-usage-billing · AlfredChaos/dsh-usage-panel · dingyi222666/dsh-wakatime

More plugins in Usage & Billing

Browse more in Usage & Billing

Guides for Usage & Billing plugins