Skip to content

asimawdah/passgen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

npm version License: MIT Node.js

passgen

Secure, minimal, and fast command-line password generator for professionals.

passgen is a compact Node.js CLI that produces cryptographically secure passwords using the Node crypto API. It provides sensible presets (weak, medium, strong, ultra) and fine-grained flags for including/excluding uppercase, lowercase, numbers, and symbols.

Highlights

  • Uses Node's built-in crypto.randomInt for secure randomness
  • Preset strength modes (weak, medium, strong, ultra)
  • CLI-friendly flags and positional preset (e.g. passgen ultra)
  • Small single-file implementation for easy auditing and embedding

Installation

Install globally from npm:

npm install -g @asimawdah/passgen

Or run without installing using npx:

npx @asimawdah/passgen ultra

To install from the repository directory (local testing):

npm install -g .

Usage

Basic usage with preset:

passgen

Result: Y@XE4+mNi1dh

Using flags:

passgen --mode strong
passgen -l 20 -u true -lc true -n true -s false

Flags

  • -l, --length (number): Password length (default: 12)
  • -u, --upper (boolean): Include uppercase letters
  • -lc, --lower (boolean): Include lowercase letters
  • -n, --numbers (boolean): Include digits
  • -s, --symbols (boolean): Include symbols
  • --mode (string): Preset mode — weak | medium | strong | ultra
  • -i, --info (boolean): Show password strength and entropy info

Examples

# Generate an ultra password (32 chars)
passgen ultra

# Strong preset
passgen --mode strong

# Custom length without symbols
passgen -l 16 -s false

Security notes

  • passgen relies on Node's crypto for random number generation; do not use non-cryptographic RNGs for password generation.
  • Avoid piping passwords through logs or unencrypted channels.

Contributing

Contributions and issues are welcome. Please open an issue or submit a pull request following standard Node.js project conventions. Run the test suite locally using:

npm test

License

MIT — see the LICENSE file.

About

Secure, minimal Node.js CLI password generator.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors