4 releases (breaking)

new 0.4.0 Feb 28, 2025
0.3.0 Feb 28, 2025
0.2.2 Feb 27, 2025
0.1.0 Feb 26, 2025

#2277 in Command line utilities

Download history

112 downloads per month

BSD-3-Clause

28KB
653 lines

Test & Build codecov

pwgen2

password generator

Default length is 18 characters, but can be changed with the first argument.

pwgen2 24

Password is generated using the following characters:

lowercase: "abcdefghijklmnopqrstuvwxyz",
uppercase: "ABCDEFGHIJKLMNOPQRSTUVWXYZ",
digits: "0123456789",
symbols: "!@#$%&.-_*",

Installation

cargo install pwgen2

Usage

Usage: pwgen2 [OPTIONS] [length] [number]

Arguments:
  [length]  password length [default: 18]
  [number]  Number of passwords to generate [default: 1]

Options:
  -p, --pin           Generate a pin
  -a, --alphanumeric  Generate an alphanumeric password
  -h, --help          Print help
  -V, --version       Print version

Examples

Create a password with 24 characters:

pwgen2 24

Create a pin:

pwgen2 -p

Create an alphanumeric password:

pwgen2 -a

Create 5 passwords with 24 characters:

pwgen2 24 5

Dependencies

~5–11MB
~112K SLoC