YYTbit/dsh-plugin-cost-tracker
Token cost tracker for DeepSeek Harness
Token cost tracker: tracks token usage per session, calculates costs from model pricing, injects cost awareness into the system prompt (enableInjection), and provides a CLI tool for cost estimation (cost --model deepseek-v4 --input 10000 --output 5000 → $0.01 with per-model rates). Configurable default model, budget warning threshold, and injection toggle.
Install
dsh plugin --profile your-profile add dsh-plugin-cost-trackernpm package dsh-plugin-cost-tracker 0.1.0 (registry-verified 2026-08-26). dsh plugin --profile your-profile add dsh-plugin-cost-tracker. Configuration via the plugin row (defaultModel, budgetWarning, enableInjection). MIT.
Compatibility
DeepSeek Harness (any profile). Model price table covers deepseek-v4 / v4-flash / r1 / vl2, gpt-4o / 4o-mini / 5.2, claude-sonnet-4 / opus-4 / haiku-4, gemini-2.5-pro / 2.5-flash.
Details
- Repo: YYTbit/dsh-plugin-cost-tracker
- Category: Other
- Stars: 3
- Version: npm dsh-plugin-cost-tracker 0.1.0 (registry-verified 2026-08-26)
- Last push: 2026-08-13
- First seen: 2026-08-13
Recent updates
v0.1.0: per-session token tracking; model-pricing cost calc; system-prompt cost injection; cost CLI.
FAQ
- How are costs calculated?
- Token usage per session is priced with the built-in per-model rates (DeepSeek, GPT, Claude, Gemini lines) — configurable via defaultModel.
- What is cost injection?
- enableInjection adds cost awareness to the system prompt so the model itself can factor spend into decisions; budgetWarning sets a threshold.
- Can I estimate cost without a session?
- Yes — the cost CLI takes model, input, and output token counts and prints the estimate directly.
Alternatives
hashdiana/dsh-token-usage · lanlandeli/dsh-usage-stats · Ychris12138/dsh-usage-stats