← Catalog

@lwlee2608/pi-ask-user

A lean terminal questionnaire for Pi with structured answers and explicit review.

Extension

Install

Install with PiG

pig install npm:@lwlee2608/pi-ask-user

Install with Pi

pi install npm:@lwlee2608/pi-ask-user
Review before installing

Packages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.

Pi manifest JSON

The pi field of package.json.

{
  "image": "https://github.com/lwlee2608/pi-extensions/releases/download/media/ask-user-demo.png",
  "extensions": [
    "./src/index.ts"
  ]
}

README

Written by the package's publisher, shown as published in version 0.4.1 (README.md). PiG does not review it.

Pi Ask User

Lets the agent stop and ask you questions in the terminal, like Claude Code's AskUserQuestion. The questionnaire renders inline in place of Pi's editor, so the transcript stays visible, and your draft editor text comes back when you're done.

Pi asking which visual style a developer portfolio should use, with a Markdown preview of the highlighted option beside the choices

Install

pi install npm:@lwlee2608/pi-ask-user

Start a new session afterward. Requires Node.js 22.19+ and Pi 1.0.0+. Don't load it alongside another extension that registers ask_user_question.

Features

  • 1–8 questions per call, each with 2–8 options. Single-select or multi-select (checkboxes).
  • Type something.: write your own answer inline, right after the options. In multi-select it can go along with checked options.
  • Explain this question: asks the session's current model to explain the question and its options in plain terms. The explanation appears above the options while the questionnaire stays open; Esc stops it. It's a separate model request that resends the conversation; its tokens count toward the session's usage, and the explanation is returned to the agent with your answers.
  • Chat about this: closes the questionnaire and tells the agent you want to talk it over first. Any answers and notes you've already given are sent along.
  • Notes: press n to attach a note to a question, or a global note from the review screen.
  • Previews: options can carry Markdown previews, shown beside the options on wide terminals and below them on tall ones.
  • Review: with several questions, a final tab shows all answers before you submit.
  • Safe cancel: Esc cancels. If you've entered anything, you're asked to confirm before it's discarded.
  • Type-ahead guard: keys you were typing when the questionnaire opened can't answer it by accident.
  • Small footprint: the tool declaration is about 1 KB of model context.

Keys

KeyAction
↑ / ↓Move between options
EnterChoose an option; in multi-select, toggle it
SpaceToggle a multi-select option
1–9Pick an option by number
Tab / Shift+Tab, ← / →Switch question or go to review
nAdd or edit a note
PageUp / PageDownScroll the option's preview
Ctrl+↑ / Ctrl+↓Scroll long question text
EscCancel (or close the note editor)

On the Type something. row, keys type text, ←/→ move the cursor, and Enter confirms. Use Tab to leave the row.

In the note editor, Enter saves and Shift+Enter adds a newline.

Custom keybindings

Pi's own selection and editor bindings apply. You can also remap these actions in Pi's keybindings file with a key, a list of keys, or [] to disable:

ActionDefault
pi-ask-user.noten
pi-ask-user.previewUppageUp
pi-ask-user.previewDownpageDown

These aren't checked for conflicts, so avoid keys Pi already uses for editing or navigation.

The tool works only in Pi's interactive terminal mode. It's hidden in print, JSON, and RPC runs.