Inquirer.js
Developer CLI · Free
An interactive-question library for Node.js CLIs: collects user parameters through selection, input, and other terminal prompts.
Also known as: sboudrias/Inquirer.js; inquirer.js; inquirerjs; cli-prompts; interactive-cli

What you can use for free
Code and local use under MIT.
Paid features and costs
Computing resources, self-hosting, and external services are paid for separately if used.
Access and limitations
Code and local use under MIT. Computing resources, self-hosting, and external services are paid for separately if used.
Use cases
- Collect user parameters through CLI prompts
- Connect prompt answers to configuration of a project operation
Example workflow
A possible workflow; this is not a report of hands-on testing.
Collect user parameters through CLI prompts.
Before you start
- Project files or environment.
- A shell and supported platform.
Steps
- Describe questions, choices, and input validation.
- Connect prompt answers to configuration of a project operation.
- Save the working command or script and the result criteria.
Check your result
- The command correctly handles paths, Unicode, and invalid inputs.
- Repeat runs behave predictably; credentials do not appear in the output.
Choosing Inquirer.js
Collect user parameters through CLI prompts
Choose this when
- Collect user parameters through CLI prompts
- Connect prompt answers to configuration of a project operation
Requirements
- Provide an interactive TTY; when configuring your own stdin, check raw mode and prompt termination.
Things to consider
- Costs and limits of free use: Computing resources, self-hosting, and external services are paid for separately if used.
- Terms of use: MIT for the code; dependencies have separate licenses.
- Input may be unavailable in noninteractive CI or a hook; the prompt function does not itself create a TTY.
Frequently asked questions
What can you use for free in Inquirer.js?
Code and local use under MIT.
What additional costs might arise with Inquirer.js?
Computing resources, self-hosting, and external services are paid for separately if used.
What terms of use matter for Inquirer.js?
MIT for the code; dependencies have separate licenses.
How do you get started with Inquirer.js?
Describe questions, choices, and input validation. Connect prompt answers to configuration of a project operation. Save the working command or script and the result criteria.
Why can Ctrl+C terminate an Inquirer.js prompt with an error?
The prompt returns a Promise, and user interruption rejects it with ExitPromptError. Handle the expected path and interface cleanup. AbortSignal is also documented for programmatic cancellation or timeout.
License
MIT for the code; dependencies have separate licenses.
MIT — permissive license
You can use, modify, distribute, and sell the code, including in a closed-source commercial product. When sharing copies or substantial portions of the code, retain the license text and copyright notice. You do not need to open-source your entire project; the author provides no warranties.
License termsTechnologies and topics
- Inquirer.js
- CLI
- Development