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

pi-deepseek-peak

v1.3.8

Published

Pi extension showing DeepSeek peak hour status in the status bar

Readme

pi-deepseek-peak

npm version license MIT pi extension node

Pi extension that shows DeepSeek peak hours in the TUI status bar, and prices the session with the real peak/off-peak rates.

Screenshot

Features

  • Status bar indicator: "DS Peak" or "DS Normal", with a countdown to the next price change ("DS Peak for 1h30m") — toggle via /dsp-countdown
  • Auto-refresh at 30s / 1m / 5m (default 5m) via /dsp-refresh
  • Real session pricing: each assistant reply's stored cost is patched at write time with the rate in effect when the request started (pi's timestamp), and /dsp-cost recomputes the whole session (peak/off-peak split, per model)
  • Uses theme colors (warning for peak, success for normal)
  • Thats it

Install

pi install npm:pi-deepseek-peak

Restart pi or run /reload to activate.

Usage

Once installed, the status bar shows the current DeepSeek pricing period. Peak and off-peak rules, windows, and current rates live at https://api-docs.deepseek.com/quick_start/pricing/ — in short: peak Mon–Fri 01:00–04:00 and 06:00–10:00 UTC, weekends and Chinese public holidays off-peak in full, off-peak rates are half the peak ones.

Chinese public holidays come from a table bundled in the source, taken from the official State Council notices on https://www.gov.cn/ (2026 and 2027 bundled). The State Council publishes the next year's dates in early November, so refresh CHINA_HOLIDAY_RANGES in extensions/deepseek-peak.ts once a year; from November on, npm test fails with a reminder until the next year is in the table. Make-up workdays (调休) need no entry: they always fall on a Saturday or Sunday, which are off-peak anyway. The countdown switches to days for long off-peak stretches ("DS Normal for 8d22h" during Spring Festival).

Commands

/dsp-countdown    # show or hide the countdown next to the dot (menu)
/dsp-refresh      # pick the status refresh interval: 30s, 1m or 5m (menu)
/dsp-cost         # recompute the whole session's real cost

/dsp-cost re-prices every assistant reply and cache keep-warm (usage) request from its stored model and request-start timestamp, so it is correct for sessions resumed from disk. Tool results and compaction/branch summaries keep pi's stored cost, the same figure the footer shows. It prints:

  • current-period rates per model
  • Total $X (peak $A / off-peak $B)
  • per-model token and cost lines
  • any model id without a rate entry (those keep pi's bundled cost)

The peak/off-peak rate is picked at the instant the request started (pi's timestamp). DeepSeek does not document whether it bills the rate at receipt or at completion, so a request that straddles 01:00/04:00/06:00/10:00 UTC is shown at the rate of its start.

/session and the footer show the stored costs, patched by this extension at write time; /dsp-cost is the only view that recomputes everything.

Settings are saved to $PI_CODING_AGENT_DIR/deepseek-peak.json (default ~/.pi/agent/deepseek-peak.json) as { "countdown": true, "refresh": 300 } and persist across restarts. Changing PI_CODING_AGENT_DIR starts from defaults at the new location.

Models

The extension resolves rates from the id the API reports (responseModel, today deepseek-flash), falling back to the requested id — so retired ids, or ids not in pi's catalogue, still price correctly. Any other id keeps pi's bundled cost.

deepseek-flash is absent from pi's built-in catalogue, but pi overlays the pi.dev catalogue ($PI_CODING_AGENT_DIR/models-store.json, refreshed every 4h), which lists it with vision — so normally nothing to do. Only an offline setup (PI_OFFLINE) needs it added by hand in $PI_CODING_AGENT_DIR/models.json; copy the entry from https://pi.dev/api/models/providers/deepseek.

Development

npm test    # self-check for the peak/countdown/pricing logic

Requires Node ≥ 22.18 (built-in TypeScript type stripping; no build step).

To test a local branch, pi install /absolute/path/to/pi-deepseek-peak (it replaces the npm version), then /reload; pi install npm:pi-deepseek-peak to switch back.

Changelog

See CHANGELOG.md for version history.

License

MIT