Simple CLI API
Await a single inquire() call and receive a typed-by-convention answers object.
Collect rich, validated answers in a local browser session and return them to Node.js.
CLI → local server → browser form → validated answers → CLIWebquirer is useful when a terminal prompt is too constrained for a richer setup flow, while keeping the application running locally and returning the result to the original process.
import { inquire } from 'webquirer';
const answers = await inquire({
title: 'Project setup',
questions: [
{ name: 'name', message: 'Project name', required: true },
{ type: 'select', name: 'stack', message: 'Stack', choices: ['React', 'Vue', 'Svelte'] },
{ type: 'confirm', name: 'deploy', message: 'Deploy?', default: true }
]
});