Bitwarden-cli Generate Passphrase options (uppercase, number)

Feature name

  • Bitwarden-cli Generate Passphrase options (uppercase, number)

Feature function

using bw generate with the -p option will generate a passphrase (list of words) instead of a password.

However the only additional options to use alongside -p is --words in order to set the number of words, and --separator to set the separator (hyphen is default)

In the Bitwarden browser extension however, there are options to customise the passphrase further, specifically:

  • Capitalize
  • Number

These are very useful additions because most sites require an uppercase and a number in their password complexity requirements.

The cli version of the generator should ideally have matching functionality to the browser extension.

How?

Use the switches that already exist for normal password generation, i.e.:

-n // include a number in the password
-u // include an uppercase in the password

And give them meaning when using the -p switch such that:

-n // adds a number
-u // capitalizes the first letters of each word

An example would be:

Current:

bw generate -unp --words 4
repave-movie-operating-thrive

The -u and -n have no meaning.

Proposed:

bw generate -unp --words 4
Repave7-Movie-Operating-Thrive

the -u and -n made a difference.

Related topics + references

Ref: The Bitwarden command-line tool (CLI) | Bitwarden Help & Support