@jqwn/pi-ask-user-question

A Pi extension that lets the model ask rich multi-question TUI dialogs with options, descriptions, previews, multi-select, and custom answers.

Package details

extension

Install @jqwn/pi-ask-user-question from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@jqwn/pi-ask-user-question
Package
@jqwn/pi-ask-user-question
Version
0.1.0
Published
Apr 30, 2026
Downloads
not available
Author
tsing
License
MIT
Types
extension
Size
20.3 KB
Dependencies
0 dependencies · 3 peers
Pi manifest JSON
{
  "extensions": [
    "./extensions"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

@jqwn/pi-ask-user-question

A Pi extension that lets the model pause mid-task and ask rich questions in the terminal UI.

It registers an AskUserQuestion tool with support for:

  • 1-4 questions in a single dialog
  • 2-4 options per question
  • short headers for multi-question navigation
  • option descriptions
  • optional option previews for code/config/mockup comparisons
  • single-select or multi-select questions
  • automatic Other custom-text answers

Installation

pi install npm:@jqwn/pi-ask-user-question

Project-local install:

pi install -l npm:@jqwn/pi-ask-user-question

Try from a local checkout:

pi -e /path/to/pi-ask-user-question

Usage

Once installed, AskUserQuestion is available to the model automatically. Ask Pi to clarify before choosing an approach, for example:

Before implementing, use AskUserQuestion to ask me which database to use: Postgres, MySQL, or SQLite.

The extension also provides a manual demo command:

/ask-user-question-demo

Tool schema

{
  questions: [
    {
      question: string,
      header: string,
      options: [
        {
          label: string,
          description: string,
          preview?: string
        }
      ],
      multiSelect?: boolean
    }
  ],
  metadata?: {
    source?: string
  }
}

Notes for model behavior

  • Use AskUserQuestion when a user preference, requirement, or decision is needed before proceeding.
  • Ask specific questions with 2-4 concrete choices.
  • Do not include an Other option; the TUI adds it automatically.
  • Use multiSelect only when multiple options can be chosen together.
  • Use previews only for concrete artifacts users need to compare, like snippets, configs, or ASCII mockups.

Publishing

This package includes the pi-package keyword and pi.extensions manifest so it can be discovered by Pi's package gallery after being published to npm.

License

MIT