CLI tool for text input using Inquirer.js.
No installation required. Use npx to run the tool directly:
npx -y @inquirer-cli/input [...options]Note: The
-yflag is used withnpxto skip the installation prompt. This is necessary because the CLI's output is consumed by$()in bash, which would otherwise cause the script to freeze.
Prompt the user for text input:
name=$(npx -y @inquirer-cli/input -r "What is your name?")
echo "Hello, $name!"<message>(required): The message to display to the user.-r, --required: Make the input required.-h, --help: Show the help message and exit.
#!/bin/sh
name=$(npx -y @inquirer-cli/input -r "What is your name?")
echo "Hello, $name!"MIT