Generate Diceware-style passphrases from the command line
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Mathieu Rousseau 47a573b78f Refactor CLI into a publishable package layout
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
2026-03-18 21:30:56 -04:00
src/diceword Refactor CLI into a publishable package layout 2026-03-18 21:30:56 -04:00
tests Refactor CLI into a publishable package layout 2026-03-18 21:30:56 -04:00
.gitignore Initialize diceword CLI for Diceware passphrase generation 2026-03-18 21:24:33 -04:00
.python-version Initialize diceword CLI for Diceware passphrase generation 2026-03-18 21:24:33 -04:00
pyproject.toml Refactor CLI into a publishable package layout 2026-03-18 21:30:56 -04:00
README.md Refactor CLI into a publishable package layout 2026-03-18 21:30:56 -04:00
uv.lock Initialize diceword CLI for Diceware passphrase generation 2026-03-18 21:24:33 -04:00

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 logic
  • diceword.data: bundled wordlists
  • tests/: unit tests

Bundled languages:

  • en: EFF long wordlist, 7776 words
  • fr: 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