passwordgen
Password generator for the command line
Last updated 5 years ago by rstacruz .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install passwordgen 
SYNC missed versions from official npm registry.

passwordgen.js

Generates passwords in the command line. Why passwordgen.js?

  • Makes phrase passwords as well as character passwords. See xkcd #936.
  • Word passwords are easier to type on mobile.

Install

npm install -g passwordgen

Usage

$ gen
ztht3JflLBzmbEu

$ gen --words 4
correct horse battery staple

$ gen --chars 10 --symbols
O_Rf-4qBOHmm

$ gen | xsel -ib   # linux
$ gen | pbcopy     # osx
# copies the password to clipboard

--help

Usage: gen [options]

Options:

  -h, --help          output usage information
  -w, --words <n>     generate <n> words
  -c, --chars <n>     generate <n> characters
  -s, --symbols       include symbols
  -S, --seed <seed>   use a seed value

Examples:

  $ gen         #=> EH8peEWVyYskuPh
  $ gen -c 5    #=> WsPnA
  $ gen -w 4    #=> correct horse battery staple

Programmatic usage

See index.js for all details.

var Passwordgen = require('passwordgen');
gen = new Passwordgen();

gen.phrase();       //=> "television pen card small"
gen.chars();        //=> "uAC4bGA0tXG"

gen.word();         //=> "kitten"
gen.words();        //=> ['hello', 'honey', 'mittens', 'score']

Also available:

gen.phrase(3);
gen.phrase({ symbols: true });
gen.phrase({ separator: '_' });

gen.words(3);
gen.words({ symbols: true });

gen.chars(10);
gen.chars(10, { letters: false });
gen.chars(10, { numbers: false });
gen.chars(10, { symbols: true });

License

© 2013, Rico Sta. Cruz. Released under the MIT License.

Current Tags

  • 0.3.0                                ...           latest (5 years ago)

4 Versions

  • 0.3.0                                ...           5 years ago
  • 0.2.1                                ...           5 years ago
  • 0.2.0                                ...           7 years ago
  • 0.1.0                                ...           7 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (2)
Dev Dependencies (3)
Dependents (1)

Copyright 2014 - 2017 © taobao.org |