fan56/dsh-llm-stats

dsh-llm-stats keeps a persistent, machine-wide LLM usage ledger for DSH and reports it through the /llm-stats slash command: sessions, turns, requests, input / cache-hit / output tokens, model and tool wall time, time-to-first-token, decode throughput, a per-model breakdown and a daily activity table.

dsh-llm-stats folds every closed agent step into one durable record line - the four provider token buckets, model wall time, first-token latency, decode throughput and tool wall time - and reports the accumulated ledger through the /llm-stats slash command as a Markdown report with GFM tables and emoji. The report covers sessions, turns, requests and steps over rolling calendar-day windows, input / cache-hit / output / total tokens, model and tool wall time, TTFT and tokens per second, a per-model breakdown of input, output, cache rate and request count, and a daily activity table with bar rendering. Because it is a slash command on a machine-wide ledger rather than a web panel, the same report renders on any surface - a terminal UI renders the tables as boxes, and headless runs show the raw markdown - which makes it usable for auditing spend outside the browser.

Usage & Billing ★ 0
View on GitHub ↗

Install

dsh plugin add @aiwayds/dsh-llm-stats

Copied verbatim from the README's Install block (the README then says to restart dsh). npm package @aiwayds/dsh-llm-stats at 0.8.0 (registry check 2026-10-16; the registry repository field resolves back to this repo).

Compatibility

Requires dsh >= 0.2.0-rc.2: the README states the plugin targets the RC/stable line only, resolves the newest of the latest / next dist-tags at runtime in CI and releases, and that the alpha line is no longer supported. The ledger is machine-wide but recording happens only where the plugin is mounted, so the README says to install it into every profile whose usage you want counted. Records are appended to a process-private shard under $DSH_HOME/llm-stats/, which is why several dsh processes on the same machine feed one ledger.

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