Skip to main content

Generate memorable, rhyming passphrases with an interactive terminal picker.

Reason this release was yanked:

Test release

Project description

rhymepass

Generate memorable, rhyming passphrases from the CMU Pronouncing Dictionary, with an interactive terminal picker.

The underground parade / an undelivered accolade / 38
My yearning tailor / its xenial whaler / 67
Those nimble amyloid / such gentle android / 16

Each passphrase is a rhyming couplet built from real English words, padded with light filler words, plus two random digits. Readable, pronounceable, easy to transcribe, and awkward to guess.

Install

From PyPI:

pip install rhymepass

With uv:

uv pip install rhymepass

Or as a development checkout:

git clone https://github.com/synmux/rhymepass.git
cd rhymepass
uv sync
uv run rhymepass

Requires Python 3.11 or newer. The clipboard copy step is currently macOS-only (see Limitations).

Usage

Two commands land the same tool on your $PATH:

  • rhymepass - the canonical name.
  • rp - a short alias.

In a terminal

rhymepass            # shows five passphrases in an interactive picker
rhymepass 10         # shows ten
rhymepass --help     # usage summary
rhymepass --version  # print the installed version

Use the arrow keys to highlight a passphrase, then press enter - the selected passphrase is copied to your clipboard and the tool exits.

Key What it does
/ Move the highlight.
enter Copy the highlighted passphrase and exit.
x Toggle whether spaces are shown. The per-row character count reflects the displayed form, so toggling spaces off makes every count drop. The character limit, however, is always enforced against the spaced form, so toggling is safe.
l Prompt for a character limit. 0 means no limit (the default); any positive value must be at least 9 characters. The batch regenerates so every passphrase fits under the new limit.
r Regenerate the batch with the current settings.
esc / q Exit without copying anything.

Under a tight character budget the picker first drops filler words from the rhyming couplet, then (below ~16 characters) falls back to a single-statement form like Half dally / 17. The " / NN" two-digit suffix is always preserved.

In a pipe

When stdout is not a TTY, rhymepass skips the picker and just prints one passphrase per line. The interactive Textual dependency is never imported on this path, so pipe invocations start fast and stay light.

rhymepass 3 | cat
# Anchor pool: 24,439 words
#
# Those nimble amyloid / such gentle android / 16
# Our bold missourian / some hopeful centurion / 84
# Any tactile contemn / much calm condemn / 84

As a library

from rhymepass import generate, build_anchor_pool, load_real_words

real_words = load_real_words()
pool = build_anchor_pool(real_words)

print(generate(pool, real_words))              # no length limit
print(generate(pool, real_words, limit=24))    # fit under 24 characters

load_real_words and build_anchor_pool are comparatively expensive; call them once per process and reuse the result for as many generate calls as you need.

How it works

Anchor words come from the intersection of two dictionaries:

  • the CMU Pronouncing Dictionary (via pronouncing) for phonetic rhymes and syllable counts,
  • the GNU Collaborative International Dictionary of English (via english-words) to exclude proper nouns, abbreviations, and obscure entries.

For every passphrase, rhymepass picks a random anchor, looks up phonetic rhymes, filters them through the same quality checks, and assembles two phrases by wrapping each anchor in zero, one, or two filler words drawn from a hand-curated list of determiners (the, some, every, …) and adjectives (nimble, radiant, zesty, …). A two-digit suffix (1099) is appended to each passphrase.

All random choices use secrets rather than random, so the output is suitable for use as an actual passphrase - though you should still pair it with whatever additional entropy your threat model demands.

When a character limit is set, the generator descends through progressively shorter output forms for the same anchor before giving up and drawing a new one, so common limits (20–30 characters) succeed in a few attempts. See AGENTS.md for the exact descent strategy.

Dependencies

  • pronouncing ≥ 0.3.0 - CMU Pronouncing Dictionary bindings.
  • english-words ≥ 2.0.2 - GCIDE word set for filtering.
  • textual ≥ 0.80 - terminal UI. Only imported on the interactive path.

See pyproject.toml for the exact pin set; the lock file covers transitive dependencies.

Limitations

  • macOS-only clipboard. The picker copies via the system pbcopy utility. Running the picker on Linux or Windows raises RuntimeError with a helpful message rather than silently failing; the generator itself (and the pipe/library paths) work everywhere. Cross-platform clipboard support (xclip/wl-copy/Windows clip) is planned but not implemented yet.
  • No history. Each run produces a fresh batch; nothing is persisted between invocations.

Contributing

For architecture, internal conventions, and the complete list of gotchas, see AGENTS.md. Run the test suite with:

uv sync --extra dev
uv run pytest

Bug reports, feature ideas, and pull requests are welcome at https://github.com/synmux/rhymepass.

Licence

MIT - see LICENSE.

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

rhymepass-0.0.0.dev0.tar.gz (74.3 kB view details)

Uploaded Source

Built Distribution

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

rhymepass-0.0.0.dev0-py3-none-any.whl (21.0 kB view details)

Uploaded Python 3

File details

Details for the file rhymepass-0.0.0.dev0.tar.gz.

File metadata

  • Download URL: rhymepass-0.0.0.dev0.tar.gz
  • Upload date:
  • Size: 74.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for rhymepass-0.0.0.dev0.tar.gz
Algorithm Hash digest
SHA256 b5e7bff3b256d6db6ddcd21b196cd3da19a39595b8dccad185c6e354ad701104
MD5 c82ce3caa1170c6226dd59e7985a7b78
BLAKE2b-256 e6812ea030b044943018f4fe6fe870690efcf4420525209066cf9509963000cc

See more details on using hashes here.

File details

Details for the file rhymepass-0.0.0.dev0-py3-none-any.whl.

File metadata

  • Download URL: rhymepass-0.0.0.dev0-py3-none-any.whl
  • Upload date:
  • Size: 21.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for rhymepass-0.0.0.dev0-py3-none-any.whl
Algorithm Hash digest
SHA256 d99996a4cd02a2b7e7d57379e6298a17eb4f909c1039fdd31ac2d38dda56fb51
MD5 84ed695aded7f106bf19643a0e2a9c0d
BLAKE2b-256 b965bdc2939ccc3a5505a2b3d63381eaebc93fef90118cfc422e43e4ab0349d8

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