Secure Password Generator

Data & APIs

Generate cryptographically secure passwords, passphrases, and API keys. Supports multiple formats and entropy calculation.

Install

openclaw skills install secure-passgen

Secure Password Generator

Generate cryptographically secure passwords, passphrases, and API keys. Uses secrets module (CSPRNG) — not random.

Quick Start

# Generate a 20-char password
python3 {baseDir}/scripts/passgen.py

# Generate a passphrase
python3 {baseDir}/scripts/passgen.py --type passphrase --words 5

# Generate an API key
python3 {baseDir}/scripts/passgen.py --type apikey

# Generate 10 passwords at once
python3 {baseDir}/scripts/passgen.py --count 10

Types

TypeExampleEntropy
passwordkX9#mP2$vL@nQ7!wR4~128 bits
passphrasecorrect-horse-battery-staple~77 bits (5 words)
apikeysk_a1b2c3d4e5f6...~256 bits
pin847291~20 bits (6 digits)
hexa3f7b2c1d9e8...~256 bits (32 bytes)
base64YWJjZGVmZ2hpams...~256 bits

Options

  • --type TYPE — Output type (default: password)
  • --length N — Password length (default: 20)
  • --words N — Passphrase word count (default: 5)
  • --count N — How many to generate (default: 1)
  • --no-symbols — Exclude symbols from passwords
  • --no-numbers — Exclude numbers
  • --separator CHAR — Passphrase separator (default: -)
  • --entropy — Show entropy calculation
  • --clipboard — Copy to clipboard (requires xclip/pbcopy)