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

@tmustier/pi-weather

v0.1.1

Published

Weather widget for Pi (/weather)

Readme

Weather Widget Extension

Run the weathr terminal weather app inside Pi via /weather.

It opens in the main widget area above the input box (same interaction style as /snake), supports live weather + simulation flags, keeps controls inside Pi, and preserves ANSI colors.

The extension prefers a Rust N-API bridge (native/weathr-bridge) and falls back to a shell bridge if native isn't built.

Demo

Weather widget demo

Open MP4 demo directly

Demo media is loaded from GitHub links and kept out of npm installs (package files whitelist + repo .npmignore).

Install

Pi package manager

pi install npm:@tmustier/pi-weather
pi install git:github.com/tmustier/pi-extensions

Then filter to just this extension in ~/.pi/agent/settings.json:

{
  "packages": [
    {
      "source": "git:github.com/tmustier/pi-extensions",
      "extensions": ["weather/index.ts"]
    }
  ]
}

Local clone

ln -s ~/pi-extensions/weather ~/.pi/agent/extensions/weather

Or add to ~/.pi/agent/settings.json:

{
  "extensions": ["~/pi-extensions/weather"]
}

Commands

  • /weather — open live weather widget
  • /weather rain — shortcut for --simulate rain
  • /weather --simulate snow --night
  • /weather-config — edit widget config (config.toml)

While open:

  • Esc or Q closes the widget
  • R restarts the weather process

Requirements

  • weathr installed and available on PATH (or in ~/.cargo/bin/weathr)
  • script command available (macOS default, util-linux on Linux)

Install weathr:

cargo install weathr

Build the native Rust bridge locally (optional, for development):

cd ~/pi-extensions/weather
npm run build:native

Requires Rust + Node.

For npm users, the extension can load prebuilt optional packages (@tmustier/pi-weather-bridge-*) when published.

Troubleshooting:

  • The extension auto-falls back to shell mode if native bridge has no output.
  • If no matching prebuilt native package is installed for your platform, it falls back to shell mode.
  • It explicitly unsets NO_COLOR for the weather child process and sets COLORTERM=truecolor when missing.
  • Shell fallback binds script stdin to /dev/null (avoids Bun socket tcgetattr issues while preserving ANSI color output and ESC handling in Pi).
  • Force shell mode manually:
PI_WEATHER_NATIVE=0 pi

Config Location

The extension uses an isolated config home:

  • ~/.pi/weather-widget/weathr/config.toml

Use /weather-config to edit it.

If you set custom latitude/longitude, also set location.auto = false or weathr will keep auto-detecting your location.

Publishing native prebuilt packages

To ship weathr-bridge without requiring Rust at install time:

  • Run GitHub Actions workflow .github/workflows/weather-native-bridge.yml (manual workflow_dispatch).
  • The workflow builds prebuilt .node files per target, syncs them into native/weathr-bridge/npm/*, and publishes @tmustier/pi-weather-bridge-* platform packages.
  • Then publish @tmustier/pi-weather (this extension) so consumers pick up the matching optional dependency versions.
  • Keep versions in sync (weather/package.json, native/weathr-bridge/package.json, and native/weathr-bridge/npm/*/package.json).

Manual fallback (if not using the workflow):

cd ~/pi-extensions/weather
npm run native:prepare-packages
# build / download per-target pi_weather_bridge.<target>.node files into native/weathr-bridge/artifacts
npm run native:sync-artifacts
npm run native:publish-packages

Changelog

See CHANGELOG.md.