@inquirer/select

Interactive select/list prompt for CLI applications with keyboard navigation.

npmmacoslinuxwindows
Try with needOr install directly
Source

About

Inquirer select/list prompt

Examples

let user pick one option from a list in terminal$ const { select } = require('@inquirer/select'); const answer = await select({ message: 'Choose one', choices: ['Option 1', 'Option 2', 'Option 3'] });
create a searchable dropdown menu for command line$ const { select } = require('@inquirer/select'); const answer = await select({ message: 'Select', choices: data, loop: false });
build interactive CLI tool with keyboard arrow navigation$ const { select } = require('@inquirer/select'); const answer = await select({ message: 'Pick environment', choices: ['development', 'staging', 'production'] });
add filtering to dropdown list for faster selection$ const { select } = require('@inquirer/select'); const answer = await select({ message: 'Choose', choices: largeList, pageSize: 10 });
create a menu with disabled options grayed out$ const { select } = require('@inquirer/select'); const answer = await select({ message: 'Select', choices: [{name: 'Available', value: 1}, {name: 'Unavailable', disabled: true}] });