1 stable release

1.0.2 Mar 9, 2024

#1869 in Cryptography

GPL-3.0-or-later

25KB
182 lines

FerroPassGen CLI

Crates.io Downloads License Dependency Status

ferropassgen-cli is a command-line interface (CLI) tool for generating strong and secure passwords and passphrases. It provides a convenient way to create robust passwords and passphrases directly from the command line.

Features

  • Generate strong passwords with customizable length and character sets
  • Generate memorable passphrases with customizable length, separator, and word case
  • Lightweight and fast password generation
  • Easy to use command-line interface

Usage

To generate a password:

ferropassgen-cli password --length <LENGTH> --charset <CHARSET>
  • --length: Specify the desired length of the generated password (required).
  • --charset: Specify the character set to use for password generation (required).

Example:

ferropassgen-cli password --length 16 --charset "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*"

To generate a passphrase:

ferropassgen-cli passphrase --length <LENGTH> [--separator <SEPARATOR>] [--upper]
  • --length: Specify the desired number of words in the generated passphrase (required).
  • --separator: Specify the separator character to use between words in the passphrase (optional, default: "-").
  • --upper: Use uppercase words in the generated passphrase (optional, default: lowercase).

Example:

ferropassgen-cli passphrase --length 4 --separator "_" --upper

Examples

Generate a 20-character password with a custom character set:

ferropassgen-cli password --length 20 --charset "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"

Generate a passphrase with 5 words, separated by underscores, and in uppercase:

ferropassgen-cli passphrase --length 5 --separator "_" --upper

Generate a passphrase with 4 words using the default settings (lowercase, separated by hyphens):

ferropassgen-cli passphrase --length 4

License

This project is licensed under the GNU General Public License v3.0.

Acknowledgements

ferropassgen-cli is built using the ferropassgen library, which provides the core password generation functionality. Special thanks to the developers of ferropassgen for their excellent work.

The passphrase generation feature uses the EFF Long Wordlist provided by the Electronic Frontier Foundation (EFF).

Dependencies

~2–2.6MB
~38K SLoC