Inquirer.js
Interactive command-line user interface library for Node.js. Inquirer provides input prompts, lists, checkboxes, password fields, confirmations, and editor prompts with keyboard navigation. Used in scaffolding tools (create-react-app, yeoman), agent setup wizards, and any CLI that needs to collect structured input from users interactively.
Score Breakdown
⚙ Agent Friendliness
🔒 Security
Local interactive CLI. Password prompts mask input but values are stored in process memory — ensure collected secrets are not logged or persisted unnecessarily.
⚡ Reliability
Best When
Building Node.js CLIs or scaffolding tools that need rich interactive user input with keyboard navigation, validation, and multiple input types.
Avoid When
Running in CI pipelines, piped scripts, or any non-TTY environment where interactive prompts can't work.
Use Cases
- • Build agent setup wizards that collect configuration through interactive prompts — select models, enter API keys, choose features
- • Create interactive scaffolding CLIs using Inquirer's list and checkbox prompts for project templates and agent configurations
- • Collect user confirmation before destructive agent operations using confirm prompts with default-no safety nets
- • Present agent output options via interactive select/search prompts when multiple results require user disambiguation
- • Build multi-step interactive forms in agent CLIs for complex configuration collection with validation on each step
Not For
- • Non-interactive/piped environments — Inquirer.js fails or behaves unexpectedly when stdin is not a TTY; check process.stdin.isTTY before using
- • Web or Electron apps — Inquirer is terminal-only; use web form libraries for browser interfaces
- • Large search-from datasets — Inquirer's search prompt loads all options in memory; use a fuzzy finder CLI for very large option sets
Interface
Authentication
No authentication — local interactive CLI library.
Pricing
Inquirer.js is open source and free.
Agent Metadata
Known Gotchas
- ⚠ Inquirer 9+ is ESM-only — require('inquirer') fails in CommonJS modules; migrate to ESM or use @inquirer/prompts (also ESM-only) or stay on Inquirer 8.x for CJS
- ⚠ Non-TTY stdin (pipes, CI) causes Inquirer to throw or produce empty output — always check process.stdin.isTTY before calling prompts
- ⚠ SIGINT (Ctrl+C) during prompts may leave terminal in raw mode — always handle process.on('SIGINT') to call process.exit() and restore terminal state
- ⚠ Password prompt with mask: '*' shows characters on Windows GitBash/MINGW terminals — test on target platforms for security-sensitive password collection
- ⚠ Large lists (100+ items) render slowly in the terminal — use filter/pageSize options to limit visible choices and improve navigation performance
- ⚠ Inquirer v9 split into separate @inquirer/prompts packages per prompt type — monolithic import still works but modular imports reduce bundle size
Alternatives
Full Evaluation Report
Detailed scoring breakdown, competitive positioning, security analysis, and improvement recommendations for Inquirer.js.
Scores are editorial opinions as of 2026-03-06.