pswg

Go CLI password generator

pswg

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.
Latest stable release GitHub Releases
MIT Small, inspectable codebase
Signed Checksums, SBOM, attestations

Usage

Explicit rules, quiet output.

pswg prints only the generated password to stdout, so it works cleanly in scripts and command substitution.

Default policy

pswg

Equivalent to -l 12 -u 1 -s 1 -n 1.

Custom composition

pswg -l 32 -u 4 -s 4 -n 8

Total length is exact; remaining characters are lowercase letters.

Shell-safe specials

password="$(pswg -safe)"

-safe uses a smaller special-character pool for shell-heavy workflows.

Downloads

Release assets for common platforms.

All assets

Verify

Checksums, SBOM, and provenance.

Stable releases include SHA-256 checksums, an SPDX SBOM, and GitHub artifact attestations signed through Sigstore.

Checksum

shasum -a 256 -c SHA256SUMS

Attestation

gh attestation verify pswg_VERSION_OS_ARCH.tar.gz \
  -R olelbis/pswg

Documentation