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-rich-questions

v0.4.0

Published

Rich interactive question forms for Pi that preserve context, tradeoffs, and complete answers.

Readme


Install in one command

pi install npm:pi-rich-questions

If Pi is already running, run /reload; otherwise, start Pi interactively. Then try:

/rich-questions

[!TIP] That's it. There is nothing else you need to configure for automatic tool calls. You can stop reading and get back to work, or keep scrolling if you're curious.

See it in action

How it works

| 1. Pi asks | 2. You decide | 3. Pi continues | | :---: | :---: | :---: | | The model opens a rich form automatically, or you run /rich-questions. | Compare detailed choices, add notes, and review everything before submitting. | Pi receives every presented option, your selections, and your notes as one complete decision record. |

Two ways to use it

Automatic tool calls

In normal use, you don't need to do anything. The model can call ask_rich_questions when one or more questions deserve a structured form instead of plain text.

Manual trigger: /rich-questions

If the model asked questions in plain text, run /rich-questions to extract them from the latest completed assistant message and open the same form. In an empty session, it offers to send demo pi-rich-questions to the active agent.

Rich forms require Pi's interactive TUI. RPC, JSON, and print modes receive an actionable error instead of trying to open the custom component. A model provider is only needed for /rich-questions extraction; direct ask_rich_questions forms do not require a separate extraction call.

Version 0.4.0 is validated against Pi 0.84.4 and 0.85.x. Following Pi's package guidance, host-provided Pi modules are wildcard peers so newer Pi releases install normally; the exact development lock and compatibility matrix record what has been tested. Fullscreen mouse interaction is available on Pi hosts that expose normalized mouse events; keyboard operation remains complete on the minimum tested version.

Features

| | | | --- | --- | | 🔘 Ask the right wayRadio, checkbox, and freeform text questionsMultiple related questions in one formOptional and required fieldsSmart defaults and custom “Other” answers | 🎨 Keep the contextMarkdown prompts and explanationsRecommendations and caveatsDetailed option tradeoffsStable machine-readable values | | ✍️ Capture thoughtful answersPer-option response notesMultiline text and freeform notesReview before submissionEvery option and selection returned to Pi | 🖥️ Stay comfortable in the terminalLong-form and small-terminal scrollingFullscreen wheel and click supportConfigured keybinding-aware guidanceANSI and Unicode-safe widths |

  • Question types: Radio, checkbox, and freeform text questions
  • Multi-question: Multiple related questions in one form
  • Markdown context: Rich formatting for prompts, recommendations, caveats, and option details
  • Recommendations: Visual markers for suggested choices
  • Field validation: Optional and required question settings
  • Smart defaults: Pre-filled radio, checkbox, and text initial values
  • Custom answers: Built-in "Other" option for custom user choices
  • Option notes: Per-option user comments on predefined choices
  • Multiline input: Text area editing and additional freeform notes
  • Review screen: Summary step to inspect answers before submission
  • Smart scrolling: Height-aware viewport for long forms and small terminals
  • Fullscreen mouse: Wheel scrolling, clickable options/model rows, and editor cursor positioning on supported Pi hosts
  • Configured keys: Semantic navigation and displayed guidance follow Pi keybindings
  • Clean cancellation: Explicit cancellation handling without partial submission
  • Complete record: Echoes every presented option, selection, and note back to the model
  • Terminal formatting: ANSI and Unicode-safe display width handling
  • Stable keys: Machine-readable option values separate from display labels

When it helps

Use Pi Rich Questions for decisions with meaningful explanation or several related inputs: deployment choices, review checklists, requirements gathering, migrations, or any prompt where a one-line clarification would discard useful detail.

[!NOTE] Plain chat is still better for a tiny, low-stakes question. Rich forms are most useful when the details affect the decision.

Quick configuration

The first time /rich-questions extracts an assistant message, choose either:

  1. Session model with low extraction thinking (recommended). Pi clamps the level to model support.
  2. A dedicated authenticated model with one of its supported thinking levels.

Use /rich-questions config to change the choice and /rich-questions reset to restore session-model/low-thinking behavior. If a dedicated model is unavailable or fails, extraction retries once with the current session model and session thinking. Pi's model runtime preserves provider-native dispatch, credentials, endpoints, headers, and environment. Extraction prefers a constrained internal tool call, retains JSON text parsing for provider compatibility, and preserves the complete assistant message in one broad multiline fallback question if all attempts fail.

Read Commands and configuration for storage, authentication, fallback, privacy, cost, and latency details.

Essential keys

You don't need to memorize these; it is very intuitive, and you can always press Ctrl+H inside the form whenever you want the built-in guide.

The table shows Pi's default bindings. Navigation, confirmation, cancellation, paging, submission, and newline hints follow your configured Pi keybindings.

| Key | Action | | --- | --- | | ↑ / ↓ | Move between options | | Enter | Select, continue, save an edit, or submit | | Space | Toggle a checkbox option | | N | Add or edit a response note for a predefined option | | Shift+Enter | Insert a newline in an editor | | Tab / Shift+Tab | Next / previous question | | PgUp / PgDn | Scroll the form ⭐️ | | Ctrl+H | Toggle the in-form guide | | Esc | Leave an editor; press again outside an editor to cancel | | Ctrl+C | Cancel immediately | | Mouse (fullscreen) | Wheel to scroll; click options or model rows; click editors to place the cursor |

The interaction and accessibility guide covers terminal behavior and the complete reference.

Documentation

| Start here | Go deeper | Project | | --- | --- | --- | | Getting startedAuthoring questionsCommands and configuration | Interaction and accessibilityResult contractTroubleshootingSecurity and privacy | ArchitectureDevelopmentReleasingChangelog |

Support and contributing

Search or open a GitHub issue for reproducible bugs and feature proposals. Read CONTRIBUTING.md before sending a pull request and SECURITY.md before reporting a vulnerability.