xkcdpass1
Generate memorable, secure multiword passphrases
Usage
xkcdpass [options]
xkcdpass --help
Overview
A flexible and scriptable password generator which generates strong passphrases, inspired by XKCD 936:
-
$ xkcdpass> correct horse battery staple
Options
-
--help -
Describe how to use this command.
-
--wordfile WORDFILE, -w WORDFILE -
Specify that the file WORDFILE contains the list of valid words from which to generate passphrases.
-
--min MIN_LENGTH -
Minimum number of letters required in words used to make password. (Default: 5)
-
--max MAX_LENGTH -
Maximum number of letters allowed in words used to make password. (Default: 9)
-
--numwords NUM_WORDS, -n NUM_WORDS -
Generate passphrases containing exactly NUM_WORDS words. (Default: 6)
-
--interactive, -i -
Generate and output a passphrase, query the user to accept it, and loop until one is accepted.
-
--valid_chars VALID_CHARS, -v VALID_CHARS -
Limit passphrases to only include words matching the regex pattern VALID_CHARS (e.g.
'[a-z]').
-
--verbose, -V -
Report various metrics for given options.
-
--acrostic ACROSTIC, -a ACROSTIC -
Generate passphrases with an acrostic matching ACROSTIC.
-
--count COUNT, -c COUNT -
Generate COUNT passphrases. (Default: 1)
-
--delimiter DELIM, -d DELIM -
Separate words within a passphrase with DELIM. (Default: ' ')
-
--separator SEP, -s SEP -
Separate generated passphrases with SEP. (Default: ' ')
Examples
- •
-
xkcdpassGenerates one passphrase with the default options. Example output:
-
pinball previous deprive militancy bereaved numeric
-
- •
-
xkcdpass--count=5 --acrostic='chaos' --delimiter='|' --min=5 --max=6 --valid_chars='[a-z]'Generates 5 passphrases, all from lower-case words and meeting the acrostic "chaos", delimited by the "|" character. Example output:
-
collar|highly|asset|ovoid|sultancaper|hangup|addle|oboist|scrollcouple|honcho|abbot|obtain|simplecutler|hotly|aortae|outset|stoolcradle|helot|axial|ordure|shale
-
Releases
6 releases since Debian 9 (Stretch); the text changed 4 times.
--separator since Debian 10 (Buster);
--valid_chars since Arch Linux 2026-11-01;
-s since Debian 10 (Buster).
--case until Debian 13 (Trixie);
--valid-chars until Debian 13 (Trixie);
-C until Debian 13 (Trixie).