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-i18n

v0.1.17

Published

/lang lets pi speak 中文, 日本語, 한국어, Español, Français, Deutsch, and more.

Readme

pi-i18n

npm license stars

LTR-only i18n/l10n platform for the Pi coding agent TUI and for Pi extensions.

Why it’s different:

  • extension-only: no pi-core fork required
  • ships real locale bundles + a small API for other extensions
  • includes opt-in core-hacks (runtime patching) to localize high-impact Pi UI surfaces today

If this is useful, please star the repo → it directly influences how much time goes into expanding locale coverage.


What it looks like

Deterministic “immersive tour” demo (all locales, 3 phases):

  1. /settings across all locales
  2. simulated localized chat across all locales
  3. /hotkeys across all locales

Pi immersive i18n tour


Install

Install with Pi, not npm:

pi install npm:pi-i18n

Then restart Pi (or run /reload).


Quickstart (2 minutes)

  1. Apply the beginner preset:
/lang setup beginner
  1. Switch language (examples):
/lang zh-TW
/lang ja
/lang fr
  1. Health checks:
/lang doctor
/lang debug
/lang probe

Commands

All operational controls stay under /lang (command names are not localized):

  • /lang — switch UI language / pick a locale
  • /lang doctor — check missing keys / placeholder mismatches
  • /lang debug — diagnostics for core-hacks + slash menu surfaces
  • /lang probe [on|off|reset] — runtime patch probe mode/report
  • /lang setup beginner — sane defaults + enables core-hacks
  • /lang demo chat — deterministic localized demo chat
  • /lang hacks — toggle core-hacks

Locale coverage

  • Full bundles: en, zh-TW, zh-CN, ja, ko, es, pt-BR, fr, de
  • Stub (English) bundles: it, pt-PT, nl, pl, tr, vi, id, uk, hi, sv, da, fi, cs, ro, el, sg
  • RTL: not supported in v1 (explicitly out of scope)

What the extension actually does

1) i18n platform for extensions

  • bundles (BundleV1) + namespace/key translation API
  • compatibility surface:
    • pi-i18n/requestApi
    • pi-i18n/registerBundle
  • upstream-aligned aliases (pi-core/i18n/*) so future core i18n can replace this cleanly

2) Best-effort Pi UI localization (no pi-core changes)

Pi UI strings are not all routed through an i18n system today. So this project includes core-hacks: runtime monkeypatching against internal Pi UI render paths.

Scope is intentionally conservative:

  • UI chrome / selectors / status / warnings / errors
  • slash command descriptions and help surfaces (e.g. /hotkeys)
  • never tool args/results, never model output

Implementation anchor:

  • src/core-hacks.ts

For extension authors

Request the API synchronously and translate at render time:

let i18n: any = null;
pi.events.emit("pi-i18n/requestApi", {
  reply: (api: any) => {
    i18n = api;
  },
});

const t = (k: string, p?: any) => (i18n ? i18n.t(`ext.myext.${k}`, p) : k);

Register bundles:

pi.events.emit("pi-i18n/registerBundle", bundle);

Contract + rollout standards:

  • SPEC.md

Configuration

Config is stored as JSON.

User config:

  • ~/.pi/agent/state/pi-i18n/config.json

Project override:

  • <repo>/.pi/state/pi-i18n/config.json

Common keys:

  • locale (e.g. "zh-TW", "fr")
  • fallbackLocale (default: "en")
  • coreHacksEnabled (best-effort UI localization)
  • probeEnabled (patch telemetry)
  • disableHeader, disableHeaderOnStartup

Files

  • user config: ~/.pi/agent/state/pi-i18n/config.json
  • project config: <repo>/.pi/state/pi-i18n/config.json

Troubleshooting

  • Installed but /lang is unknown
    • run /reload (or restart Pi)
  • Strings didn’t change after switching locale
    • run /lang hacks (core-hacks must be enabled to localize non-i18n’d Pi UI)
  • Unsure what’s patched
    • run /lang probe and /lang debug

Development

Local dev install:

pi install -l <path-to-pi-i18n>

Then:

/reload
/lang doctor

For maintainers

Release plan: see RELEASE.md.

Manual quality gate (in a real Pi session):

/lang setup beginner
/lang doctor
/lang debug
/lang probe

/settings
/hotkeys

Demo media (how to regenerate the GIF)

The hero GIF is produced via stills → stitch (not fragile sleeps):

# WSL2 recommended
OUT="$HOME/tmp/pi-i18n-immersive-$(date +%F)-r1"
mkdir -p "$OUT"
bash tools/vhs/make-immersive-stills.sh "$OUT"

# outputs:
# - $OUT/pi-immersive.gif
# - $OUT/pi-immersive.mp4
# - $OUT/stills/*.png

See VHS.md for WSL setup (ttyd >= 1.7.2).


License

MIT