Skip to content

michaelblaess/codename-generator

Repository files navigation

codename-generator

English · Deutsch


Stars Forks Issues Pull Requests Last Commit CI License Python Themes

A terminal codename generator. Pick a theme (Greek gods, racehorses, gemstones, whisky, ...), get a batch of unique suggestions (10 to 40, your pick) combined with adjective or verb modifiers and optional phonetic mutations.

Themes

Greek gods · Egyptian gods · Norse gods · Constellations · Zodiac · Animals · Racehorses · Flowers · Gemstones · Wines · Whisky · Mountains · Mushrooms · Historic ships · Landmarks · Dev · Random (pooled)

Two themes use their own curated word pools:

  • Evocative - a stark adjective + an emotionally charged noun (Cold Ember, Iron Hour, Sacred Tide). Never mutated.
  • Power words - single bold standalone words, no modifiers (Mythos, Skyline, Oracle, Aegis).

A theme YAML can override the global modifier pools (adjectives, verbs), restrict the name patterns, disable mutation (mutate: false) or set the mutation level it starts at (default_mutation).

Setup

setup.bat        # Windows
./setup.sh       # macOS/Linux

Requires uv.

Usage

TUI (default)

run.bat          # Windows
./run.sh         # macOS/Linux
uv run codename  # any platform

Keys: r regenerate · c copy slug · n copy name · m bump mutation +25% · t cycle theme · f favorite · v view favorites · a about · q quit

The left settings panel has three sliders: mutation chance (0-100%), word count (1, 2 or 3 visible words per name) and suggestions (10/20/30/40 names per batch). Moving a slider re-renders the current set of names in place so you see the effect immediately — only r draws a fresh batch. Each theme keeps its own set, so switching themes back and forth never loses what you had. Hover a theme in the list for a tooltip describing it. Right-click any suggestion for a context menu (copy slug/name, favorite, regenerate). The theme list starts with a Favorites entry — selecting it lists your saved favorites on the right, where only the mutation slider applies and re-mutates them live. Ships with 35+ colour themes (Textual built-ins plus retro palettes) — switch with t or the Ctrl+P theme picker. Chosen colour theme, mutation chance, word count, suggestion count and favorites are persisted to ~/.codename-generator/settings.json across restarts.

CLI

uv run codename --list-themes
uv run codename -t greek-gods           # 30 suggestions (default)
uv run codename -t flowers -n 5 --mutation-chance 0.6 --seed 42
uv run codename -t random -n 20         # pulls from every theme
uv run codename -t whisky --words 3     # exactly 3 components per name

A * next to a suggestion means a phonetic mutation was applied (Pegasus -> Pegasos, Carnation -> Carnatiyn, Frankel -> Frankil).

Adding themes

Drop a YAML file into src/codename_generator/data/themes/:

name: My Theme
description: ...
words:
  - Word1
  - Word2

Credits

The settings sliders use textual-slider by Tom J Gooding - thank you for the widget.

License

Apache License 2.0 - see LICENSE.

About

Codename generator written in python with textual

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors