What is codename.py?
codename.py
is a small Python script that spits out fun, memorable names for whatever you’re working on.
- Need a server name that isn’t “server-b”?
- Naming a side project or Git branch?
- Want your test VM to sound like a secret mission?
Run codename.py
and get instant inspiration—whether that’s Gallant Phoenix, Wily Wombat, or Operation Turquoise Spider.
Features
- Adjective–Noun combos: Clever Otter, Wandering Nebula, Ancient Lantern…
- Ubuntu-style: Alliterative, animal-inspired names (e.g., Brilliant Badger, Wily Wombat)
- Military-style: Operation-style names (Operation Silent Arrow)
- Single noun mode: Just a big, bold word
- JSON output: For piping into other tools
- Batch mode: Generate a bunch of names at once (
--count
) - No dependencies: Pure Python, runs anywhere with
python3
Why did I write this?
I am the kind of person for whom everything just grinds to a halt the moment I have to name something. It could be a project or a video game character or a host name–it doesn’t matter. I always sit there for way too long trying to think of the perfect name.
One night I started tinkering with a few wordlists and a Python script. It began spitting out names that made me laugh—and suddenly my VM wasn’t ubuntu-test3 anymore. Now I didn’t actually call it Operation Larvae Offensive but the silly output inspired better names.
That’s the real magic: it shakes ideas loose and makes synapses fire. It’s like having your own /dev/inspiration for ideas–an endless stream of names and half-names and weird combinations.
try running
codename --count 50
or even codename --count 1000
and see!
Usage
Run these commands right from your terminal:
python3 codename.py
— Random “Adjective Noun” pairpython3 codename.py --ubuntu
— Ubuntu-style: adj & animal share first letterpython3 codename.py --military
— Military-style: Operation + nounpython3 codename.py --noun
— Just a nounpython3 codename.py --count 5
— Generate five names
The script uses standard libraries and does not require a venv. Just make sure to keep the wordlists in the same directory.
Sample Output
in Military mode:
Operation Mass Derision
Operation Enhance
Operation Known Tommy
Operation Rival Threat
Operation Slack
Or in Ubuntu mode:
Vacant Vespid
Obvious Osprey
Tireless Treehopper
Zealous Zebra
Sustained Snipe
Word Lists
The magic comes from three simple text files:
- adjectives.txt — required
- nouns.txt — required
- animals.txt — optional (for Ubuntu mode)
They live next to the script. Add your own words to make themed generators—spooky Halloween names, corporate buzzword names, or even fantasy D&D-style names.
The Unix system dictionary is just a giant, flat list of words. Parsing for parts of speech (for example, to separate adjectives from nouns) requires libraries like NLTK and WordNet–and that’s slow at runtime. Bundling pre-built wordlists with the script turned out to be a super-fast and lightweight alternative, and an easily extensible one.
👉 Look out for an upcoming post about how I made these wordlists using nltk and wordnet and about the joys of good corpora.
Future Direction
- I’m planning on fixing JSON output with
json.dumps()
- I’m working on a –theme argument to allow for custom word lists and new themes like –cyberpunk or –fantasy. Those will need custom dictionaries or a better way to “detect” a cool word.
- I’d also like to support a tiny web server mode so your non-technical friends might be impressed too!
Conclusion
Why settle for project-2 when you could have, Operation Neon Owl or Randy Rhinoceros? Grab your copy of codename.py on GitHub and start naming stuff like it matters!