@inquirer/password

Interactive password prompt component for Node.js CLI applications

npmmacoslinuxwindows
Try with needOr install directly
Source

About

Inquirer password prompt

Commands

inquirer

Examples

Create a simple password prompt in a Node.js script$ node -e "const { password } = require('@inquirer/password'); password({ message: 'Enter password:' }).then(pwd => console.log('Got:', pwd));"
Use in an interactive CLI to securely prompt for credentials$ const pwd = await password({ message: 'Database password:', mask: '*' });
Prompt with validation for minimum password length$ const pwd = await password({ message: 'New password:', validate: (val) => val.length >= 8 || 'Min 8 chars' });