@inquirer/expand

Interactive expand prompt for Node.js CLI applications

npmmacoslinuxwindows
Try with needOr install directly
Source

About

Inquirer checkbox prompt

Commands

inquirer

Examples

Create an expand prompt asking user to choose an action$ node -e "const { expand } = require('@inquirer/expand'); expand({ message: 'Conflict in file.txt:', choices: [{key: 'y', name: 'Overwrite'}, {key: 'n', name: 'Skip'}] }).then(answer => console.log(answer));"
Build a CLI menu with keyboard shortcuts for quick selection$ node -e "const { expand } = require('@inquirer/expand'); expand({ message: 'Select action:', choices: [{key: 'd', name: 'Delete'}, {key: 'e', name: 'Edit'}, {key: 'h', name: 'Help'}] }).then(console.log);"
Use in a script to prompt for file operation with single-key shortcuts$ node script.js # where script uses @inquirer/expand for prompted file actions