Skip to main content

Modern CLI password generator with an encrypted local vault

Project description

pw-cli

CI License: MIT Python

Modern CLI Password Generator with an Encrypted Local Vault

Fast, secure, local-first command-line tool for generating strong passwords, memorable passphrases, and storing credentials in an encrypted local vault.

Features

  • pwcli / pwcli generate / pwcli gen — strong random passwords
  • pwcli phrase — memorable passphrases using the EFF wordlist
  • pwcli vault — encrypted local password vault
  • pwcli config — flexible TOML configuration
  • --copy — copy to clipboard with automatic clearing after 30 seconds
  • --json — machine-readable output
  • Shell completion support

Quick Start

# Generate password
pwcli generate -l 20 --copy

# Short alias
pwcli gen -l 32 --no-symbols --copy

# Memorable passphrase
pwcli phrase -w 6 -C -n --copy

# Vault
pwcli vault init
pwcli vault add github
pwcli vault get github --copy

Shell Completion

pwcli --install-completion

Restart your terminal afterwards.

Security Highlights

  • Passwords are generated using Python's secrets module with configurable character classes
  • Passphrases use the EFF wordlist
  • --copy copies passwords to the clipboard and attempts to clear it after 30 seconds
    • Clipboard clearing is best-effort: if the process exits early or the terminal is closed, the clipboard may not be cleared
  • Vault data is encrypted locally using Fernet encryption (AES-128-CBC + HMAC-SHA256)
  • Vault keys are derived from the master password using PBKDF2 with 480,000 iterations
  • Master password is never stored — only a random salt and the encrypted vault data are written to disk
  • No data is ever sent over the network

Threat model: pw-cli protects your vault if the vault file is copied or leaked without the master password. It does not protect against malware, keyloggers, compromised terminals, screen recording, clipboard monitoring, or a weak master password.

For highly sensitive accounts, consider using a professionally audited password manager.

Installation from source

git clone https://github.com/fsrxc2bvv9-ctrl/pw-cli.git
cd pw-cli

# Recommended
uv pip install -e ".[dev]"

# Or with pip
pip install -e ".[dev]"

pwcli --help

Changelog

See CHANGELOG.md.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pw_cli-0.1.0.tar.gz (55.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pw_cli-0.1.0-py3-none-any.whl (55.8 kB view details)

Uploaded Python 3

File details

Details for the file pw_cli-0.1.0.tar.gz.

File metadata

  • Download URL: pw_cli-0.1.0.tar.gz
  • Upload date:
  • Size: 55.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for pw_cli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 96185043d824063984ac40c8f59bf6a77fe2b6dcd5dea34cf114116abd56fe5a
MD5 39439eae39f5578599f9505d1f68c3d2
BLAKE2b-256 4af6b25cc58dae8702da09e7dd92ec2e2ba1abafb98cd93a1d9c1c7fdb2a4ce2

See more details on using hashes here.

File details

Details for the file pw_cli-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pw_cli-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 55.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for pw_cli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 94b938e14a88196c0ea6be32e2dd6db98f290aa2d0f86a24fda03476a92542ac
MD5 68d55ede3a962d0fcc75534a0b64b5eb
BLAKE2b-256 e716bdccf50b1bdded7d75932054935afaed50ccee1868985a2c7e93a3f44ad7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page