@haichiuuu/pi-ask-user-question-lite
A minimal, timeout-free AskUserQuestion tool for Pi with TUI, RPC, and headless support.
Package details
Install @haichiuuu/pi-ask-user-question-lite from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@haichiuuu/pi-ask-user-question-lite- Package
@haichiuuu/pi-ask-user-question-lite- Version
0.2.0- Published
- Aug 20, 2026
- Downloads
- 326/mo · 7/wk
- Author
- haichiuuu
- License
- MIT
- Types
- extension
- Size
- 27.5 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
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/Nprogress - Native RPC
selectandinputdialogs withPrevious question/Next questionactions - 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