Mu-scorpio/token-usage-counter

Persistent provider-reported token usage totals with per-session, per-model, and daily activity statistics.

Persistent provider-reported token usage statistics for DeepSeek Harness: keeps uncached input, cache read, cache write and output usage in separate buckets, and exposes cumulative, daily, per-session and per-model views. Provides a built-in Web settings page with a heatmap, tracks local-day token totals and call counts, counts usage only after a successful completion anchor (no phantom counts from interrupted runs), and registers an interactive /tokens command.

Usage & Billing ★ 2 updated 2026-08-27
View on GitHub ↗

Install

dsh plugin --profile web add -w --config.auto-install-peers=false dsh-token-usage-counter

dsh plugin --profile web add -w --config.auto-install-peers=false dsh-token-usage-counter (npm dsh-token-usage-counter 0.3.1, verified on npm 2026-08-30), then dsh web. The bundle disables the built-in usage accumulator and usage page before mounting, avoiding duplicate settings registration.

Compatibility

DSH web profile; stores data in the Harness usage-stats settings namespace; /tokens command when the commands service is mounted; MIT.

Details

Recent updates

4 separate usage buckets; persistent totals; global/session/provider-model views; daily activity + call counts; settings page with heatmap; safe completion-anchored counting; /tokens command.

FAQ

Which buckets does it track?
Uncached input, cache read, cache write and output — kept separate as reported by the provider.
When is usage counted?
Only after a successful completion anchor, so interrupted or failed runs do not create phantom counts.
Does it conflict with built-in usage?
No — the bundle disables the built-in usage accumulator and usage page before mounting, avoiding duplicate settings registration.

Alternatives

YZz-S/dsh-token-cost-meter · Sttrevens/dsh-cost-meter · Ychris12138/dsh-usage-stats

More plugins in Usage & Billing

Browse more in Usage & Billing

Guides for Usage & Billing plugins