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

@dxvapor/pi-prompt-enhancer

v1.2.0

Published

Prompt enhancer with comparison popup, version history, searchable model picker, and quick-enhance mode

Readme

pi-prompt-enhancer

A fork of @danchamorro/pi-prompt-enhancer for the pi coding agent, extending it with a configurable dedicated model for prompt enhancement.

Instead of always using whatever model is currently active in your session, you can pin a specific model (e.g. a free GitHub Copilot model) that is used exclusively for enhancement — regardless of what you have selected for regular coding work.


Features

  • Ctrl+Shift+E — enhance the current editor text in-place
  • Ctrl+Shift+Z — restore original prompt (undo enhancement)
  • /enhance <prompt> — enhance inline text, place result in editor
  • /enhance-model — interactive picker to set the enhancement model from your configured providers
  • Status bar indicator showing the currently pinned model (✨ gpt-5-mini)
  • Global and project-level config, with project taking precedence
  • Merge-safe config writes — other keys in the JSON are preserved

Prerequisites

  • pi coding agent installed and running
  • At least one AI provider configured in pi (run /model inside pi to verify)

Installation

Option A — extensions entry in settings.json (recommended)

Clone the repo somewhere on your machine:

git clone https://github.com/DxVapor/pi-prompt-enhancer.git ~/projects/pi-prompt-enhancer

Add it to ~/.pi/agent/settings.json:

{
  "extensions": [
    "~/projects/pi-prompt-enhancer"
  ]
}

Then run /reload inside pi.

Option B — copy into the extensions directory

cp ~/projects/pi-prompt-enhancer/{index.ts,clean.ts} ~/.pi/agent/extensions/prompt-enhancer/

Note: If you previously had "npm:@danchamorro/pi-prompt-enhancer" in your packages list, remove it first to avoid duplicate command registration.


Configuration

Interactive (recommended)

Run /enhance-model inside pi. Two sequential prompts appear:

  1. Scope — global (all projects) or project-local
  2. Model — every model that has auth configured in pi's registry

There is a "↩ Use active session model" option at the top to clear a previously pinned model.

The command writes to the JSON config file automatically (creating directories as needed).

Manual JSON

Global — applies to all projects:

~/.pi/agent/extensions/prompt-enhancer.json

Project-local — overrides global for one project:

<project-root>/.pi/extensions/prompt-enhancer.json

Both files use the same format:

{ "model": "gpt-5-mini" }

model must match the id of a model in pi's registry. Run /model inside pi to browse available IDs.

Model resolution order

| Priority | Source | |---|---| | 1 | model in project config (.pi/extensions/prompt-enhancer.json) | | 2 | model in global config (~/.pi/agent/extensions/prompt-enhancer.json) | | 3 | Active session model — original upstream behaviour |

Tip: When the same model ID exists under multiple providers (e.g. gpt-5-mini appears under both azure-openai-responses and github-copilot), the extension picks the first one that has auth configured — so you always get a working model rather than a silent failure.


Usage

| Key / Command | Action | |---|---| | Ctrl+Shift+E | Enhance editor text in-place | | Ctrl+Shift+Z | Restore original (undo) | | /enhance <prompt> | Enhance inline text, place result in editor | | /enhance-model | Pick or reset the dedicated enhancement model |

The status bar shows ✨ <model-id> when a model is pinned. While enhancement is running it briefly shows ✨ Enhancing (<model-name>)....


How it differs from the upstream

| | @danchamorro/pi-prompt-enhancer | This fork | |---|---|---| | Model used | Active session model | Config file → fallback to active model | | Config | — | prompt-enhancer.json (global + project) | | Model picker | — | /enhance-model command | | Status bar | — | ✨ <model-id> when pinned | | Duplicate provider fix | — | Searches authed models first |

The system prompt, enhancement logic, clean(), and all shortcuts are unchanged from upstream.


Contributing

Contributions are welcome. Please open an issue before submitting a large PR so we can discuss the approach first.

  1. Fork the repo and create a branch: git checkout -b feat/your-feature
  2. Make your changes
  3. Commit using Conventional Commits: feat(config): add support for per-session overrides
  4. Open a pull request against main

For bug reports, please include:

  • pi version (pi --version)
  • Contents of your prompt-enhancer.json (redact any keys)
  • The error notification or behaviour you observed

License

MIT — see LICENSE.

Original extension by Daniel Chamorro.