Skip to content

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
Step-by-step guide: how to use Inquirer.jsInstall, first run, examples, tips and FAQs

How to get it

  1. 1

    Install with a package manager

    You'll need: Node.js

    Install the inquirer package

    npm install inquirer
  2. 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. 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

ProjectStarsTypeLevelUpdatedBest for
Inquirer.js (this)21.6kLibraryintermediate5 days agoNode.js developers building interactive command-line tools
ink40.2kLibraryintermediate5 days agoJavaScript or TypeScript developers who already know React
Modernizr25.7kLibraryintermediate15 days agoFront-end developers who need to serve different experiences depending on browser capabilities
cli24.3kLibraryintermediate4 days agoGo developers writing a command line tool with subcommands and flags
inferno16.5kLibraryintermediate6 days agoDevelopers already familiar with React who want a React-like API
debug11.5kLibrarybeginner22 days agoNode.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.