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. Clipboard copy works on macOS (via pbcopy), Linux (via wl-copy, xclip, or xsel — install one through your package manager if none are present), and Windows (via clip).

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

  • Clipboard requires a platform helper binary. macOS ships pbcopy out of the box and Windows ships clip since Vista, so both work without extra setup. On Linux you need one of wl-copy (from the wl-clipboard package, preferred on Wayland), xclip, or xsel. If none are available, the picker raises RuntimeError with a message naming the options; the generator itself (and the pipe/library paths) work without any clipboard tool.
  • 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.dev1.tar.gz (77.7 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.dev1-py3-none-any.whl (22.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: rhymepass-0.0.0.dev1.tar.gz
  • Upload date:
  • Size: 77.7 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.dev1.tar.gz
Algorithm Hash digest
SHA256 4f977e16b77d959c3646e615cfbed7bce8739d45a1f128a5382d753949c57d81
MD5 f7554320b86becceff8a6ce8709cfd25
BLAKE2b-256 80db5e99808859fc0008687e1066e9635b740d17850d745716e778df66cfa114

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rhymepass-0.0.0.dev1-py3-none-any.whl
  • Upload date:
  • Size: 22.3 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.dev1-py3-none-any.whl
Algorithm Hash digest
SHA256 77a3433d32392feadeedb902b7476172731b588635d5b6effb73a3d56a4d1abe
MD5 7386ee6c84e57f8894df0447ffb62d95
BLAKE2b-256 c21116a43ea00f2c92aca19d5f884638e0ca45d2814a00d6960516027ce9d100

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