
Inquirer.js
A Node.js library of interactive command-line prompts like lists, inputs, and checkboxes.
- Stars
- 21.6k
- Forks
- 1.4k
- Licence
- MIT
- Language
- TypeScript
- Last update
- 5 days ago
- Type
- Library
What it is
Inquirer.js is a TypeScript/JavaScript library that lets Node.js command-line programs ask users questions in the terminal, such as text input, yes/no confirmations, selection lists, and checkboxes. Developers use it to build interactive setup wizards and CLI tools without writing the terminal input handling themselves. The README provided here is truncated, so this summary covers only what it describes.
- Add a guided setup prompt to a command-line tool that asks for a project name and options
- Present a selectable list of choices and return the user's pick to your program
- Collect a masked password or confirmation before running a destructive command
Great for
- Node.js developers building interactive command-line tools
- Authors of project scaffolding or setup wizards that ask multiple questions
- TypeScript developers who want typed prompt definitions
- Teams that want a maintained, widely used prompt library under the MIT license
Not ideal for
- Developers who need prompts in a browser or web UI, since this targets the terminal
- Projects that need non-Node.js runtimes, because the library is built for Node.js
- Users looking for a ready-made end-user application rather than a library to embed
How to get it
- 1
Install with a package manager
You'll need: Node.js
Install the inquirer package
npm install inquirer - 2
Run it
- Install the package with npm in your Node.js project
- Import inquirer in your script
- Call inquirer.prompt with a list of question objects
- Read the returned answers object and use the values in your program
- 3
Get the most out of it
- Use TypeScript to get typed answers from your question definitions
- Combine multiple question types in one prompt call for a multi-step wizard
- Consult the packages directory in the repository for individual prompt modules
Downloads
Strengths
- Covers common prompt types for building interactive terminal interfaces
- Written in TypeScript, so prompt answers can be typed in your code
- MIT licensed and actively maintained, with a large star count and a recent push
Trade-offs
- The README provided is truncated, so full API details and every prompt type are not confirmed here
- As a library, it requires writing code; it offers no standalone command to run
- Behavior in non-interactive environments such as CI is not described in the material provided
How it compares
| Project | Stars | Type | Level | Updated | Best for |
|---|---|---|---|---|---|
| Inquirer.js (this) | 21.6k | Library | intermediate | 5 days ago | Node.js developers building interactive command-line tools |
| ink | 40.2k | Library | intermediate | 5 days ago | JavaScript or TypeScript developers who already know React |
| Modernizr | 25.7k | Library | intermediate | 15 days ago | Front-end developers who need to serve different experiences depending on browser capabilities |
| cli | 24.3k | Library | intermediate | 4 days ago | Go developers writing a command line tool with subcommands and flags |
| inferno | 16.5k | Library | intermediate | 6 days ago | Developers already familiar with React who want a React-like API |
| debug | 11.5k | Library | beginner | 22 days ago | Node.js developers who want named, toggleable log output instead of plain console.log calls |
Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.