yyb16yyb-hub/dsh-deepseek-usage
Real-time DeepSeek API usage: account balance with low-balance alerts (browser notification on threshold crossing), token & request stats (total/today/last-60s windows, per-model and per-session), estimated cost — a composer dock plus a settings-page usage panel.
dsh-deepseek-usage shows real-time DeepSeek API usage in DeepSeek Harness: account balance polling the /user/balance endpoint (default every 30s, multi-key aggregation), usage stats via the llm/stream waterfall in total/today/last-60s windows with cache-hit rate, persistent daily history in ~/.dsh/deepseek-usage/usage.json powering trend charts and CSV exports, per-model estimated cost with peak/off-peak pricing, a live stats line under the composer, a settings usage panel (balance card, per-key accounts, config editor, history heatmap and 30-day bars, per-session table, CSV exports), low-balance alerts that turn the dock amber/red with one browser notification per threshold crossing and an optional blockOnLowBalance, and a deepseek_usage model tool for on-demand queries. Vitest unit tests and GitHub Actions CI are included.
Install
dsh plugin --profile web add github:yyb16yyb-hub/dsh-deepseek-usageGitHub/source per README (README EN primary w/ zh edition). npm name dsh-deepseek-usage exists but its repository field points to ben7am1n/dsh-deepseek-usage — NOT claimed for this repo. Install per README: dsh plugin --profile web add github:yyb16yyb-hub/dsh-deepseek-usage. First git install requires build authorization: allow the exact package key pnpm prints under allowBuilds in the profile's pnpm-workspace.yaml, then re-run. Pin a commit with #<sha> for reproducible installs.
Compatibility
DeepSeek Harness web profile (composer dock + settings section + llm/stream waterfall); resolves the DeepSeek key via the credentials seam (env → ~/.dsh/.credentials.yaml → project/user .env).
Details
- Repo: yyb16yyb-hub/dsh-deepseek-usage
- Category: Usage & Billing
- Stars: 0
- Version: GitHub main (yyb16yyb-hub/dsh-deepseek-usage; local 0.1.0 tarball per README)
- Last push: 2026-08-16
- First seen: 2026-08-16
Recent updates
Key re-resolution on every poll, so credential changes apply immediately without restart.
FAQ
- How does it get the API key?
- Through the dsh credentials seam — process env, ~/.dsh/.credentials.yaml, then project/user .env — re-resolved on every poll. A key entered on the Models page is picked up automatically.
- Which windows does it track?
- Total, today and last-60-seconds windows for requests, tokens (input/output/cache-read/cache-write/reasoning) and estimated cost, with the cache-hit rate.
- Can it block requests on low balance?
- Optionally yes — below the alert threshold the dock turns amber/red with one browser notification per crossing; blockOnLowBalance stops LLM requests while below it.
Alternatives
940842546/dsh-usage-billing · namesColin/DSH-Plugin-Account-HUD