@eddie0521/pi-ask
v0.1.0
Published
Interactive questionnaire tool for the Pi coding agent — single or multi-question forms with tab navigation, multi-select, and free-text answers.
Maintainers
Readme
Pi Ask
Interactive questionnaire tool for the Pi coding agent — structured questions with option lists, multi-select, and free-text answers.
A Pi extension that gives the model a questionnaire tool: one question renders as a simple option list, several questions render as a tab-based form with a submit summary. Based on the questionnaire example from badlogic/pi-mono.
Install
pi install npm:@eddie0521/pi-askOnce installed and pi restarted, the model can call:
questionnaire— ask one or more questions and collect the answers in a single tool result
Features
- Single or multi question — one question shows a plain option list; multiple questions get a tab bar (
Tab/←/→to switch) plus a Submit tab summarizing all answers - Multi-select —
allowMultipleturns a question into checkboxes (Spaceto toggle,Enterto confirm) - Free-text answers — a "Type something." entry (
allowOther, on by default) opens an inline editor - Option descriptions — each option can carry a muted description line below its label
- Lightweight schema —
idand optionvalueare optional; they default toq1, q2, …and the option label
Example
A call the model might make:
{
"questions": [
{
"label": "Scope",
"prompt": "Which part should I refactor first?",
"options": [
{ "label": "Parser", "description": "tokenizer + AST" },
{ "label": "Renderer" }
]
},
{
"label": "Tests",
"prompt": "Which test levels do you want?",
"allowMultiple": true,
"options": [{ "label": "Unit" }, { "label": "Integration" }, { "label": "E2E" }]
}
]
}Keyboard
| Key | Action |
|-----|--------|
| ↑ ↓ | Move between options |
| Enter | Select option / confirm multi-select / submit |
| Space | Toggle option (multi-select) |
| Tab / ← → | Switch question tabs (multi-question) |
| Esc | Cancel |
Development
bun install
bun testLicense
MIT — based on the questionnaire example from badlogic/pi-mono (MIT).
