Metadata-Version: 2.4
Name: pw-cli
Version: 0.1.0
Summary: Modern CLI password generator with an encrypted local vault
Author: Alex
License-Expression: MIT
Project-URL: Homepage, https://github.com/YOUR_USERNAME/pw-cli
Project-URL: Repository, https://github.com/YOUR_USERNAME/pw-cli
Project-URL: Issues, https://github.com/YOUR_USERNAME/pw-cli/issues
Keywords: password,cli,security,vault,passphrase
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Security
Classifier: Topic :: Utilities
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: typer>=0.25.1
Requires-Dist: rich<14.0.0,>=13.7.0
Requires-Dist: pyperclip>=1.9.0
Requires-Dist: platformdirs>=4.2.0
Requires-Dist: cryptography<44.0.0,>=43.0.0
Requires-Dist: tomli>=2.0.0; python_version < "3.11"
Requires-Dist: tomli-w>=1.0.0
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0; extra == "dev"
Requires-Dist: ruff>=0.8.0; extra == "dev"
Requires-Dist: mypy>=1.10.0; extra == "dev"
Requires-Dist: build>=1.2.0; extra == "dev"
Requires-Dist: twine>=5.0.0; extra == "dev"

# pw-cli

[![CI](https://github.com/fsrxc2bvv9-ctrl/pw-cli/actions/workflows/ci.yml/badge.svg)](https://github.com/fsrxc2bvv9-ctrl/pw-cli/actions/workflows/ci.yml)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
[![Python](https://img.shields.io/badge/Python-3.10%2B-blue)](https://www.python.org)

**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

```bash
# 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

```bash
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

```bash
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](CHANGELOG.md).

## License

MIT
