npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

ds-peak-warningx

v1.5.2

Published

DeepSeek peak/off-peak pricing warning in the opencode TUI sidebar

Readme

ds-peak-warningx

npm version weekly downloads Publish to npm

An opencode TUI plugin that shows DeepSeek's peak / off-peak pricing windows in your terminal, so you know when requests are more expensive.

DeepSeek charges more during peak hours. The default schedule follows their current billing rules: peak windows 01:00–04:00 and 06:00–10:00 UTC on weekdays, and fully off-peak weekends — evaluated by the Beijing calendar day. Every window can carry its own day-of-week pattern, so any weekday-based pricing rule can be configured.

Features

  • Status dot — colored ● PEAK / ● OFF-PEAK: red at peak, green off-peak, yellow when peak starts within 30 minutes. On v1 it sits next to the home prompt; on v2 it lives in the footer status row. The permanent (can freeze) note means the display can paint stale data after sleep or a timer stall — treat it as guidance.
  • Sidebar panel — current status, UTC + local time, next transition across days, and per-window countdowns. Collapsible to a compact status line from /dspeak.
  • /dspeak — in-app window management (add, remove, reset) with a live status header. Edits persist across restarts. Format: HH:MM-HH:MM in UTC, optionally restricted to weekdays (22:00-02:00, 06:00-10:00 Mon-Fri, 14:00-16:00 Sat,Sun). Days are Beijing calendar days; wrapping midnight is fine.
  • Peak guard (on by default) — asks for confirmation before DeepSeek prompts go out during peak. block mode holds the prompt until confirmed; warn mode just toasts. One confirmation silences it for the cooldown (default 5 minutes, 0 = ask every time). /dspeak-confirm pre-confirms up front. Slash commands, shell mode, and typing are never blocked.

opencode v1 (requires >=1.18.29)

Install

From this repo (global):

git clone https://github.com/Bashar-AlGhada/opencode-ds-peak-warning ~/.config/opencode/ds-peak-warningx
cd ~/.config/opencode/ds-peak-warningx
npm install

Then add it to ~/.config/opencode/tui.json (path relative to the config file):

{
  "$schema": "https://opencode.ai/tui.json",
  "plugin": ["./ds-peak-warningx/src/index.tsx"]
}

Or via CLI: opencode plugin ~/.config/opencode/ds-peak-warningx -g. Restart opencode.

From npm:

opencode plugin [email protected] -g    # drop -g for per-project

(Or in-TUI: ctrl+p → plugins → shift+i, type [email protected].)

Updating

opencode plugin [email protected] -g -f   # keep -g if installed globally

Then restart opencode. Check npm view ds-peak-warningx version for the latest.

Options (tui.json)

{
  "plugin": [["[email protected]", { "ranges": [
    { "start": "01:00", "end": "04:00", "days": [1, 2, 3, 4, 5] },
    { "start": "22:00", "end": "02:00" }
  ] }]]
}
  • ranges — peak windows overriding the defaults. days is 0 = Sunday … 6 = Saturday (Beijing day); omit for every-day windows. In-app /dspeak edits win and persist.
  • order — sidebar slot order (default 150).
  • panel — false (or the /dspeak toggle) collapses the panel to a compact status line.
  • guard — { "enabled": true, "mode": "block", "cooldownMs": 300000, "providers": ["deepseek"] }.

opencode v2

Same package, same features — one ./tui entry serves both generations. Differences: the status dot lives in the footer status row, and settings persist in v2 durable storage (v1 state does not carry over — v2 starts once from options/defaults, then /dspeak edits persist).

Install

In cli.json (from npm):

{
  "plugins": [{ "package": "[email protected]", "options": { "panel": true } }]
}

Local checkout (point at the repo root):

{
  "plugins": ["file:///path/to/opencode-ds-peak-warning"]
}

Restart opencode.

Updating

Bump the pinned version in cli.json (or git pull a local checkout), then restart opencode.

Options (cli.json)

Same options as v1 (ranges, panel, guard); order is v1-only.

Development

npm install
npm run typecheck   # tsc --noEmit
npm run sanity      # logic boundary checks
npm run pack        # npm pack --dry-run, shows the published tarball contents

The package targets the TUI via exports["./tui"] and ships raw .tsx source (opencode's runtime transpiles it).

License

MIT