Default policy
pswg
Equivalent to -l 12 -u 1 -s 1 -n 1.
Go CLI password generator
Generate random passwords with explicit length and character-count rules, backed by Go crypto/rand.
$ pswg
ravelmQp9x_t
$ pswg -l 24 -u 4 -s 4 -n 4 -safe
mQra7_tobK2p:veL4,nwuS8.
Usage
pswg prints only the generated password to stdout, so it works cleanly in scripts and command substitution.
pswg
Equivalent to -l 12 -u 1 -s 1 -n 1.
pswg -l 32 -u 4 -s 4 -n 8
Total length is exact; remaining characters are lowercase letters.
password="$(pswg -safe)"
-safe uses a smaller special-character pool for shell-heavy workflows.
Downloads
Verify
Stable releases include SHA-256 checksums, an SPDX SBOM, and GitHub artifact attestations signed through Sigstore.
shasum -a 256 -c SHA256SUMS
gh attestation verify pswg_VERSION_OS_ARCH.tar.gz \
-R olelbis/pswg
Documentation