1.1.3 • Published 4 years ago
pwd-cli v1.1.3
pwd-cli
This is a cli wrapper for generate-password and bcryptjs to generate and hash password from command line.
Password generated will be like GFZmGFWBVJ.
Install
npm install -g pwd-cliGenerate a password
password # this will generate a password for you.GFZmGFWBVJ # output passwordGenerate a password with options
password --numbers -l 20 # The password contains numbers and length will be 20options { numbers: true, length: 20 } # output options
l9y6eds7u8Q8wDKbIVuZ # output passwordOptions available
Please refer options to https://www.npmjs.com/package/generate-password#available-options
const optionDefinitions = [
{name: 'length', alias: 'l', type: Number},
{name: 'numbers', alias: 'n', type: Boolean},
{name: 'symbols', alias: 's', type: Boolean},
{name: 'lowercase', type: Boolean},
{name: 'uppercase', type: Boolean},
{name: 'excludeSimilarCharacters', type: Boolean},
{name: 'exclude', type: String},
{name: 'strict', type: Boolean},
{name: 'hash', type: Boolean}, // show hash result by bcrypt as well.
{name: 'help', alias: 'h', type: Boolean}, // will show option definitions and not generate password.
]Hash your password
hash-pwd <YOUR_PASSWORD>hash-pwd super_secret
$2a$10$jKwDbN2d4aLmC7tiaoqoXeTpExgCd2LBGnVc.oQTZhTG6I7sh4hYmInstall from source
clone this repository and run npm link.