#password #command-line #generate #options

app genpass

A simple yet robust commandline random password generator

65 releases

0.5.27 Jan 2, 2023
0.5.16 Dec 31, 2022
0.5.14 Mar 7, 2022
0.5.2 Dec 27, 2021
0.2.1 May 26, 2018

#74 in Authentication

Download history 1/week @ 2023-08-08 70/week @ 2023-08-15 990/week @ 2023-08-22 137/week @ 2023-08-29 139/week @ 2023-09-05 2/week @ 2023-09-12 2/week @ 2023-09-19 7/week @ 2023-09-26 6/week @ 2023-10-03 1/week @ 2023-10-10 4/week @ 2023-10-17 30/week @ 2023-10-24 105/week @ 2023-10-31 77/week @ 2023-11-14 72/week @ 2023-11-21

260 downloads per month


514 lines

genpass status-badge dependency status Donate

A simple yet robust commandline random password generator.

Multiplatform (Linux, Mac, Windows). Fast.

You can use it generate keys or passwords in scripts or use it as your primary desktop password generator.

Has extensive generative test suite, including tests against a Rust port of Dropbox's password strength tester zxcvbn

Typical usage

genpass                  # use defaults, they're good
genpass 2048             # generate long password, can be used as a key
genpass --passphrase 128 # generate longer passphrase
genpass -dlu             # no special characters

Generating a password directly into your system clipboard

On a Mac:

genpass | pbcopy

On Linux:

genpass | xclip -selection clipboard

Getting genpass

If you're using Nix flakes

  • you can try genpass without installing it nix run git+https://git.cyplo.dev/cyplo/genpass.git
  • flake url is https://git.cyplo.dev/cyplo/genpass.git

On any system with Rust installed

$ cargo install genpass

Commandline options

$ genpass --help

genpass [FLAGS] [length]

-h, --help                 Prints help information
-l, --include-lowercase    Generate the password using lowercase letters
-n, --include-numeric      Generate the password using numeric characters
-s, --include-special      Generate the password using special (non-alphanumeric) characters
-u, --include-uppercase    Generate the password using uppercase letters
--passphrase           Create a passphrase of (at least) the given length instead of a password.

<length>    The length of the password to generate [default: 32]

A note on passphrases

  • Passphrases are generated using EFF's "long" password list.
  • Passphrases are at least --length characters long, not necessarily exactly that long.

A road to 1.0

TODOs to get genpass to 1.0


All contributions welcome !


git clone https://git.cyplo.dev/cyplo/genpass.git


  • you can use Nix to recreate the development environment reproducibly
  • nix develop in this repo will give you a shell with all the dependencies needed


~98K SLoC