@inquirer/password

Interactive password input prompt for Node.js CLI applications

npmmacoslinuxwindows
Try with needOr install directly
Source

About

Inquirer password prompt

Examples

prompt user for password in interactive terminal$ const password = require('@inquirer/password'); password.prompt();
hide password input while user types$ const { password } = require('@inquirer/password'); await password({ message: 'Enter password:' });
validate password meets requirements before accepting$ await password({ message: 'Password:', validate: (input) => input.length >= 8 || 'Min 8 chars' });
ask for password with custom error message$ await password({ message: 'Enter password:', transformer: () => '••••••' });
collect password input without displaying characters on screen$ const pwd = await password({ message: 'Create password:' }); console.log(pwd);