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

@haichiuuu/pi-ask-user-question-lite

v0.2.0

Published

A minimal, timeout-free AskUserQuestion tool for Pi with TUI, RPC, and headless support.

Readme

pi-ask-user-question-lite

A minimal AskUserQuestion tool for Pi Coding Agent. It lets an agent pause, ask a structured question, and continue with the user's explicit choice.

Built with Pi Coding Agent.

Features

  • One question or 1–4 sequential questions per call
  • 2–4 described options per question
  • Single-select and multi-select
  • Discoverable free-text Other… choice with an explicit Enter hint
  • Previous/next question navigation with preserved option, checkbox, and text drafts
  • One persistent TUI across multi-question flows, avoiding transition flicker
  • Compact Question 1/N progress
  • Native RPC select and input dialogs with Previous question / Next question actions
  • Non-blocking JSON/print fallback
  • No human-response timeout
  • Sequential tool execution so dialogs never overlap
  • No bundled skill, workflow, or system-prompt policy

Install

pi install npm:@haichiuuu/pi-ask-user-question-lite

Or install directly from GitHub:

pi install git:github.com/haichiu/pi-ask-user-question-lite

For local development:

pi -e ./extensions/index.ts

Restart Pi or run /reload after installation.

Tool

The package registers one model-callable tool:

AskUserQuestion

Example input:

{
  "questions": [
    {
      "header": "Database",
      "question": "Which database should we use?",
      "options": [
        { "label": "PostgreSQL", "description": "Strong relational features." },
        { "label": "SQLite", "description": "Small and dependency-free." }
      ]
    },
    {
      "header": "Features",
      "question": "Which optional features should be enabled?",
      "multiSelect": true,
      "options": [
        { "label": "Backups" },
        { "label": "Metrics" }
      ]
    }
  ]
}

Mode behavior

| Mode | Behavior | | --- | --- | | TUI | Persistent keyboard-driven selector; ← / → move through submitted questions | | RPC | Native select/input requests with Previous question / Next question actions | | JSON / print | Immediate plain-text fallback; never blocks waiting for unavailable UI |

In TUI option mode, ← returns to the previous question and → moves forward when the current question already has a submitted answer. Escape cancels. Escape inside the Other… editor returns to its option list. Submitted answers and drafts remain available in both directions.

Pi Fabric users who capture extension tools may optionally keep this human-interaction tool directly visible so it does not inherit a machine-execution timeout:

{
  "capture": {
    "keepVisible": ["fabric_exec", "AskUserQuestion"]
  }
}

This is a Fabric-specific host setting, not a requirement of the package.

Development

npm install
npm run check
npm pack --dry-run

Attribution

Adapted from ilovepixelart/pi-code, which is based on Pi's MIT-licensed question example. See LICENSE.

License

MIT