Generate Diceware-style passphrases from the command line
- Python 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
Move the command-line implementation out of __init__.py into a dedicated cli module so the package structure matches a cleaner free software first release. --- par Clanker |
||
| src/diceword | ||
| tests | ||
| .gitignore | ||
| .python-version | ||
| pyproject.toml | ||
| README.md | ||
| uv.lock | ||
diceword
Small CLI to generate Diceware-style passphrases with a clear --help, bundled English and French wordlists, and support for custom wordlists.
The code is structured as a small publishable package:
diceword.cli: command-line entrypoint and core logicdiceword.data: bundled wordliststests/: unit tests
Bundled languages:
en: EFF long wordlist, 7776 wordsfr: Tails/Tor Project French Diceware list, 7776 words, already ASCII-normalized
Usage
uv run diceword
uv run diceword --words 5 --separator ' '
uv run diceword --entropy
uv run diceword --lang fr
uv run diceword --wordlist ~/wordlists/fr.txt --words 7 --separator _
uv run diceword --show-languages
uv run diceword --show-langages
Directly from your shell wrapper:
diceword --lang fr --words 6
diceword --lang en --separator ' '
Development
uv run python -m unittest discover -s tests
uv run diceword --help
Notes
- Bundled languages:
en,fr - Custom wordlists accept either Diceware format (
11111 word) or one word per line - Entropy is estimated from the wordlist size and requested word count
- The bundled French list comes from the Tails/Tor Project Diceware effort referenced by the official Diceware page and is kept in ASCII form for easier typing