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-english-practice

v0.1.0

Published

Practice English coding prompts before Pi executes them

Readme

Pi English Practice

Pi English Practice is a Pi Coding Agent extension that turns Chinese coding instructions into practical English exercises before Pi executes them. It shows a natural reference translation, asks you for a close English rewrite, and executes only the reference translation after your rewrite preserves the important meaning.

Requires Node.js 22.19 or newer and Pi Coding Agent 0.83.0 or newer. The MVP supports only Pi's interactive terminal UI (TUI).

Install and run

For local development, start Pi from this directory:

pi -e .

To install the package from a local checkout:

pi install /absolute/path/to/pi-english-practice

Pi extensions run with the same full local permissions as Pi itself. Review extension source before installing it, just as you would any other locally executable package.

Commands

  • /english-on enables practice for the current TUI session.
  • /english-off disables practice and clears the footer indicator.
  • /english-status reports whether the mode is on or off.

The mode starts OFF in every new, restored, switched, or reloaded session. While enabled, the footer shows English Practice: ON.

Training flow

When the mode is on, English input and input that is primarily code continue to Pi unchanged. A primarily Chinese instruction is intercepted before the agent starts:

  1. Code blocks, inline code, URLs, and paths are protected byte-for-byte.
  2. The current Pi model creates a concise coding-agent English reference.
  3. The reference stays visible while you rewrite it in the multiline editor.
  4. Your rewrite may use common synonyms, abbreviations, small word-order changes, and harmless grammar mistakes. It must retain every action, target, important constraint, negation, scope boundary, and required technical literal.
  5. A failed rewrite shows specific missing or changed meaning and lets you retry without a limit.
  6. A passing rewrite may show up to two brief corrections. Pi then receives only the reference English, never the source Chinese or your practice attempt.

Large fenced code or log blocks are carried into the final instruction automatically and do not need to be retyped. Short inline code, paths, URLs, and similar required literals must remain exact. Original image attachments are preserved on a successful transformation.

Inside an exercise:

  • /retranslate <note> asks for a new reference using your note.
  • /retranslate asks for another natural version.
  • /cancel or Esc cancels without executing anything.

Model use, privacy, and failures

Translation and rewrite validation reuse Pi's currently selected model and authentication configuration, so they consume that provider's tokens and may incur normal provider charges. Each Chinese task usually needs one translation call plus one validation call per attempt. A malformed structured response may cause one additional repair call.

Side-channel requests contain only the current masked instruction or the current reference and rewrite. They have no tools, conversation history, project files, or Pi system prompt. The extension stores no learning history, scores, attempts, or statistics and writes no extension state to session entries, files, or a database.

The behavior is fail-closed. Missing models, authentication errors, timeouts, provider errors, malformed JSON, altered protected fragments, unsupported modes, and concurrent exercises stop the task without starting the agent. On non-cancel failures, the original text is restored to Pi's editor. Because Pi cannot restore consumed attachments to the editor, the extension explicitly asks you to reattach any original images.

Steer and follow-up input submitted while the agent is running does not start an exercise; wait until Pi is idle and submit it again.