devacc8/dsh-billing-badge

dsh-billing-badge puts a billing-season pill in the DSH composer statistics row: peak or off-peak with a countdown to the next switch, and a panel with the Beijing wall clock, the account balance and its granted/topped-up split from the official balance endpoint.

dsh-billing-badge adds a billing-season pill to the DSH composer statistics row, immediately after the native Cache hit reading. The pill itself shows a coloured dot (amber for peak, green for off-peak), the season name and the time until it flips; clicking it opens a panel with the billing season, the next switch with the Beijing wall clock, the current Beijing time, the account balance with its currency, the granted and topped-up split when the account has one, and a refresh button. Because the underlying numbers are read live from the official balance endpoint and the tariff is computed from the published schedule, the badge answers the question a cost plugin cannot: whether it is worth running this work now or waiting for the off-peak window, without opening the DeepSeek console.

Usage & Billing ★ 1
View on GitHub ↗

Install

dsh plugin --profile web add dsh-billing-badge

Copied verbatim from the README's install block. The README also documents dsh plugin --profile web add github:devacc8/dsh-billing-badge. npm package dsh-billing-badge at 0.1.4 (registry check 2026-10-16; the registry repository field resolves back to this repo).

Compatibility

The season rule is the published DeepSeek one - peak is Beijing time, Monday to Friday, 09:00-12:00 and 14:00-18:00, everything else including all of Saturday and Sunday is off-peak at half price. Balance figures come from the official GET /user/balance endpoint, and the README is careful about what the three numbers mean: total_balance = granted_balance + topped_up_balance, where the endpoint reports only the unexpired part of a grant, so a lapsed grant disappears from that row on its own. The panel names the two parts only when the account is actually split, and adds a warning row only when the response's is_available flag says the balance is not enough for API calls.

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