Command line passphrase generator written in Go.
The EFF Diceware Wordlists are embedded, with the long wordlist used by default. See the EFF's Deep Dive for more details on the benefits of this word list.
Click to expand
-
If you don't have it already, install the
ca-certificates
packagesudo apt install ca-certificates
-
Add gabe565 apt repository
echo 'deb [trusted=yes] https://apt.gabe565.com /' | sudo tee /etc/apt/sources.list.d/gabe565.list
-
Update apt repositories
sudo apt update
-
Install pwgen-go
sudo apt install pwgen-go
Click to expand
-
If you don't have it already, install the
ca-certificates
packagesudo dnf install ca-certificates
-
Add gabe565 rpm repository to
/etc/yum.repos.d/gabe565.repo
[gabe565] name=gabe565 baseurl=https://rpm.gabe565.com enabled=1 gpgcheck=0
-
Install pwgen-go
sudo dnf install pwgen-go
Click to expand
Install pwgen-go-bin with your AUR helper of choice.
Click to expand
Download and run the latest release binary for your system and architecture.
Run pwgen
to generate a list of random passphrases.
Predefined profiles are available — see pwgen profiles
for a list of defaults. You can specify a profile or a template as a positional argument. If the argument resembles a Go template, it will be interpreted as such; otherwise, it will be treated as a profile. (For explicit control, you can also use the --template
(-t
) or --profile
(-p
) flags.)
To change the number of generated results, pass a number to the --count
(-c
) flag.
Pwgen takes advantage of shell completion; for example, when choosing a profile, try pwgen <TAB><TAB>
.
Also see the generated docs.
By default, pwgen will generate passwords with 4 words from the EFF Long Wordlist and a random number:
$ pwgen
Pebbly1-Destitute-Shelve-Renter
Mushiness-Possibly0-Trustee-Outfit
Trimness-Freebase-Spotless-Manmade2
Recall7-Uncrushed-Agreeing-Crepe
Tavern-Moustache1-Scrubber-Mashed
Lyrically2-Comic-Imitate-Victory
Idiom-Jockey-Subheader6-Scallop
Blot-Sympathy-Nurture-Spotter5
Womanhood6-Capsize-Zigzagged-Siesta
Unwomanly-Unwashed-Urchin-Empty1
$ pwgen -c1 alphanum:16
cFAutu4OizPQ0d3N
$ pwgen -c1 words:5
tinker coagulant bundle gave deviator
$ pwgen -c1 pin:6
771283
$ pwgen -c1 '{{ words 3 | join "-" | upper }}'
HAPPY-BLANK-SAFEHOUSE
A configuration file will be generated the first time pwgen-go is run. Depending on your operating system, the file will be available at:
- Windows:
%AppData%\pwgen-go\config.toml
- macOS:
~/Library/Application Support/pwgen-go/config.toml
- Linux:
~/.config/pwgen-go/config.toml
An example configuration is also available at config_example.toml
.
Templated passphrases are generated using Go's text/template package.
All Sprig functions are available, plus some extras documented here.
- Local Generation: All passphrases are generated directly on your device. No data is sent or received externally.
- Bundled Resources: The EFF wordlists are embedded within the binary, ensuring no external data is fetched during generation.
- Cryptographic Quality: All random functions use cryptographically secure (
crypto/rand
) random strings. - Anonymity by Design: By default, 10 passphrases are generated to help obscure which one you choose.