@inquirer/rawlist

Interactive list prompt for terminal with arrow key selection.

npmmacoslinuxwindows
Try with needOr install directly
Source

About

Inquirer rawlist prompt

Examples

let user pick one option from a list in terminal$ import { createPrompt, RawListPrompt } from '@inquirer/rawlist'; const answer = await createPrompt(RawListPrompt)({ choices: ['Option 1', 'Option 2'] });
show numbered list and get user selection$ const { rawlist } = require('inquirer'); rawlist({ name: 'selection', message: 'Choose one:', choices: ['Apple', 'Banana', 'Orange'] });
prompt user to select deployment environment$ const answer = await prompt({ type: 'rawlist', name: 'env', message: 'Select environment:', choices: ['Development', 'Staging', 'Production'] });
create interactive menu for command line tool$ rawlist({ message: 'What would you like to do?', choices: ['Create', 'Update', 'Delete', 'Exit'] }).then(answer => console.log(answer));
build survey asking user to pick single best answer$ const survey = new Inquirer.prompt([{ type: 'rawlist', name: 'rating', message: 'Rate this:', choices: ['Poor', 'Fair', 'Good', 'Excellent'] }]);