Minimal Pi package that adds a structured ask_questions tool.
pi install npm:pi-questionsSmall, obvious, boring.
This package gives Pi one compact way to ask users structured questions in a TUI. The stable contract is the bounded schema and interaction flow. Prompt copy stays intentionally small and tunable.
- survey engine
- workflow builder
- forms platform
- feature growth that adds more surface area than it removes
- asks one or more structured questions in Pi's interactive TUI
- supports single-choice options plus an always-available custom answer
- uses a final review step for multi-question runs
- returns graceful non-error results for cancel and non-interactive sessions
ask_questions accepts a small ordered list of questions. Each question has:
question: full prompt shown to the userheader?: short review/progress labeloptions: short concrete choices
A Write your own answer path is always present in the TUI.
Example:
{
questions: [
{
header: "Stack",
question: "Which stack should we use?",
options: [
{ label: "Bun + TypeScript (Recommended)", description: "Smallest path" },
{ label: "Node + TypeScript", description: "Use the more common runtime" }
]
}
]
}