Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Password Generator

Generate cryptographically secure passwords and passphrases.

Quick Examples

# Default password (20 characters)
pwm generate
# Output: K9#mPx$vL2@nQw8!Zr4j
 
# Copy to clipboard
pwm generate --copy
 
# Show strength meter
pwm generate --strength

Passwords

Basic Usage

# Default: 20 chars, all character types
pwm generate
 
# Custom length
pwm generate --length 32
pwm generate -l 16

Character Options

# Exclude symbols
pwm generate --no-symbols
# Output: K9mPxvL2nQw8Zr4jTb5y
 
# Exclude numbers
pwm generate --no-numbers
# Output: K#mPx$vL@nQw!Zr*jTb%
 
# Alphanumeric only
pwm generate --no-symbols --no-numbers
# Output: KmPxvLnQwZrjTbyFgHk
 
# Include similar characters (l, 1, O, 0)
pwm generate --include-similar

Strength Indicator

pwm generate --strength
# Output:
# Password: K9#mPx$vL2@nQw8!Zr4j
# Strength: ████████████████ Very Strong
# Entropy: 132 bits

Copy to Clipboard

# Copy without showing
pwm generate --copy
# ✓ Password copied to clipboard
 
# Show and copy
pwm generate --copy --strength

Passphrases

Passphrases are easier to remember and type.

Basic Usage

# Default: 4 words
pwm generate --passphrase
# Output: correct-horse-battery-staple
 
# Short flag
pwm g -p

Word Count

# More words = more secure
pwm generate --passphrase --words 5
pwm generate --passphrase --words 6
pwm generate -p -w 8

Separator

# Custom separator
pwm generate --passphrase --separator "_"
# Output: correct_horse_battery_staple
 
pwm generate --passphrase --separator "."
# Output: correct.horse.battery.staple
 
pwm generate --passphrase --separator ""
# Output: correcthorsebatterystaple

Capitalize Words

pwm generate --passphrase --capitalize
# Output: Correct-Horse-Battery-Staple

With Strength

pwm generate --passphrase --words 5 --strength
# Output:
# Passphrase: correct-horse-battery-staple-paper
# Strength: ████████████████ Very Strong
# Entropy: 64 bits

Examples

API Keys

# 32 char alphanumeric
pwm generate -l 32 --no-symbols

Wi-Fi Passwords

# Memorable passphrase
pwm generate --passphrase --words 4 --separator ""

Database Passwords

# Maximum security
pwm generate -l 64 --strength

PIN Codes

# 6 digit PIN
pwm generate -l 6 --no-symbols --no-uppercase --no-lowercase
# Note: Use only for low-security scenarios

Scripting

# Generate and use in script
API_KEY=$(pwm generate -l 32 --no-symbols)
echo "Generated key: $API_KEY"
 
# Generate multiple
for i in {1..5}; do
  pwm generate -l 24
done

Command Reference

pwm generate [options]
 
Options:
  -l, --length <n>     Password length (default: 20)
  -p, --passphrase     Generate passphrase instead
  -w, --words <n>      Number of words for passphrase (default: 4)
  -s, --separator <s>  Word separator (default: "-")
  --no-symbols         Exclude symbols
  --no-numbers         Exclude numbers
  --no-uppercase       Exclude uppercase
  --no-lowercase       Exclude lowercase
  --include-similar    Include similar chars (l, 1, O, 0)
  --capitalize         Capitalize passphrase words
  --strength           Show strength indicator
  -c, --copy           Copy to clipboard
  -h, --help           Show help