dsh-turn-price

Shows what each completed turn cost in CNY on its own row under the turn, with a click-to-open breakdown naming the tokens per category, the unit rate, the matched price rule and the billing instant; per-model rates are edited on a settings page inside DSH — four token categories plus weekly recurring peak/valley rules with arbitrary multipliers and absolute time-window promo prices that override them. It also reads the balance or remaining quota of 14 providers (DeepSeek, OpenRouter, Zhipu GLM, Moonshot, MiniMax, Kimi Coding, OpenAI-compatible relays and more) and shows today / this month / this session spend next to it; spend is accumulated in a local ledger (atomic writes, one book per API key, 1-24 month retention, JSON export), and a monthly calendar lets any day be corrected by hand - including days with no balance observation - with an optional note. Usage and rates are computed locally from what the provider reported; balance is read straight from the provider API with your own key, and nothing is sent to a third party. Its HTTP routes have no DSH access check, so a web page open in your browser could call them.

Overview

Shows what each completed turn cost in CNY on its own row under the turn, with a click-to-open breakdown naming the tokens per category, the unit rate, the matched price rule and the billing instant; per-model rates are edited on a settings page inside DSH — four token categories plus weekly recurring peak/valley rules with arbitrary multipliers and absolute time-window promo prices that override them. It also reads the balance or remaining quota of 14 providers (DeepSeek, OpenRouter, Zhipu GLM, Moonshot, MiniMax, Kimi Coding, OpenAI-compatible relays and more) and shows today / this month / this session spend next to it; spend is accumulated in a local ledger (atomic writes, one book per API key, 1-24 month retention, JSON export), and a monthly calendar lets any day be corrected by hand - including days with no balance observation - with an optional note. Usage and rates are computed locally from what the provider reported; balance is read straight from the provider API with your own key, and nothing is sent to a third party. Its HTTP routes have no DSH access check, so a web page open in your browser could call them.

Installation

Install from npm

dsh plugin --profile web add dsh-turn-price

Resolves a published tarball rather than cloning the repository, and installs without any extra setup. Swap `web` for your profile name if you run another one.

Install from GitHub

dsh plugin --profile web add github:littlefish04/dsh-turn-price

Installing from GitHub runs the project's build script, which pnpm blocks until you allowlist it — run the command once and pnpm prints the exact key to add under `allowBuilds` in ~/.dsh/profiles/web/pnpm-workspace.yaml.

Version compatibility

Compatibility is unconfirmed. Check the project documentation for supported versions.

Installation notes

  • May run terminal commands