Zero-Allocation Name Generation for Every Universe
namgen is a high-performance command-line generator written in pure modern C++17. Combine customizable adjective and noun wordlists with custom casing, or invoke any of the 907 built-in procedural generators spanning 40 fantasy, sci-fi, historical, and gaming universes.

Interactive Playground
Live In-Browser Name Engine
Running real procedural generators directly in your browser. Zero simulation—every click executes the actual JavaScript engine.
Combinator Options
-c)5 namesDM Screen & Worldbuilding Studio
Everything a Dungeon Master needs on game night: 6-genre faction matrices, deep NPC dossiers with audio pronunciation, walk-in taverns with multi-tier rumors, 5-room procedural dungeons, and a magic item forge.
Interactive WebAssembly Terminal
Execute real C++17 namgen commands directly inside your browser. No terminal, compiler, or server round-trip required.
Architecture & Features
Engineered for Extreme Speed and Flexibility
A look under the hood of namgen’s C++17 design and performance optimizations.
Zero Heap Allocation Engine
All word datasets are pre-compiled into immutable .rodata using static constexpr std::string_view tables. Dynamic branch switching uses lightweight ArrayView spans to avoid any runtime vector allocations.
907 Lore-Accurate Generators
Over 900 standalone procedural generators spanning 40 categories—from narrative character & planet descriptions to DnD, Star Wars, Warhammer, Elder Scrolls, Pokémon, and historical cultures.
Sub-Millisecond Execution
Compiled directly with GCC/Clang with -O2 optimization. All 907 generators can be executed sequentially in under 19 seconds, making namgen ideal for scripts, game development, and pipelines.
Decoupled Dynamic Registry
Clean C++ architecture replaces monolithic if/else blocks with a modular GeneratorRegistry. Dynamic registration powers command routing and automatic, categorized --help output.
Advanced Combinatorics
Generate combinations from built-in or custom wordlists with versatile casing styles (CapWords, camelCase, lowercase), arbitrary separators, and character exclusion filters.
WebAssembly & Node.js (`namgen.wasm`)
All 907 C++ generators compile to standalone WebAssembly via Emscripten. Includes an out-of-the-box Node.js CLI runner and full C-export interop for client-side web applications.
Unix Standard & Environment Config
Full support for shell environment variables (SEPARATOR, COUNT, ADJ_FILE, NOUN_FILE) and bundled with an extensive 900+ entry Unix manual page (man namgen).
Installation & Setup
Get Started in Seconds
namgen has zero external C++ dependencies besides the C++17 standard library.
# 1. Clone the repository
git clone https://github.com/joshuacox/namgen.git
cd namgen
# 2. Build in parallel across all CPU cores
make -j$(nproc)
# 3. Install binary, man page, and assets
sudo make install-std=c++17)./usr/local/share/namgen/assets or local repo directory.man namgen.CLI & Environment
Options & Configuration Reference
Fine-tune output format, casing, and word sources through command flags or shell environment variables.
Command-Line Options
| Option Flag | Description | Default |
|---|---|---|
| -c, --count COUNT | Number of names to generate. | Terminal height, or 24 |
| -S, --seed NUM | Seed random number generator deterministically for reproducible runs. | std::random_device{}() |
| -u, --unique | Ensure no duplicate names are emitted in the generated batch. | false |
| -m, --match REGEX | Filter generated names by regular expression pattern. | None |
| --min-len NUM, --max-len NUM | Set minimum and maximum character length constraints on generated names. | None |
| --compose GEN1,GEN2 | Compose multiple generators together (e.g. fantasy-dragons,places-castles). | None |
| --template STRING | Template format string for generator composition (e.g. "{1} of {2}"). | "{1} of {2}" |
| -i, --interactive | Launch full-screen interactive terminal explorer UI with search and live rolls. | false |
| --json | Output results as a structured JSON array of strings. | false |
| --csv | Output results in CSV format with "name" column header. | false |
| --slug, --kebab | Convert generated names into URL-friendly lowercase kebab-case slugs. | false |
| -s, --separator SEP | Custom separator string inserted between adjective and noun. | "-" |
| -x, --null-separator | Do not print separator string; directly concatenates words. | false |
| --cap, --capcasing | Capitalize the first letter of both adjective and noun (PascalCase / CapWords). | false |
| --camel, --camelcasing | Lower-case adjective, capitalize first letter of noun (camelCase style). | false |
| -a, --adj-file, --adj FILE | Path to custom adjective wordlist file (newline-delimited). | assets/adjectives/*.list |
| -n, --noun-file, --noun FILE | Path to custom noun wordlist file (newline-delimited). | assets/nouns/*.list |
| -e, --exclude STRING | Characters to strip from all generated words. | "-'" |
| --debug | Print debug diagnostics including word source paths and counters to stderr. | false |
| -h, --help | Display usage instructions and dynamically enumerate all 907 procedural generators. | — |
Shell Environment Variables
| Variable Name | Description | Default Value |
|---|---|---|
| $SEED | Sets numeric seed for deterministic random number generation across runs. | None |
| $SEPARATOR | Sets the default separator string (e.g. export SEPARATOR="_"). | "-" |
| $NULL_SEPARATOR | When set to "true", disables the separator. | "false" |
| $CAPCASING | When set to "true", forces CapWords capitalization on both words. | "false" |
| $CAMELCASING | When set to "true", forces camelCase casing. | "false" |
| $COUNT | Overrides default count of generated names. | Terminal height |
| $ADJ_FILE | Path to default adjective file. | Random pick from ADJ_FOLDER |
| $NOUN_FILE | Path to default noun file. | Random pick from NOUN_FOLDER |
| $ADJ_FOLDER | Directory path containing adjective wordlists. | /usr/local/share/namgen/assets/adjectives |
| $NOUN_FOLDER | Directory path containing noun wordlists. | /usr/local/share/namgen/assets/nouns |
| $EXCLUDE | Characters to strip from words. | "-'" |
| $DEBUG | When set to "true", enables diagnostic stderr output. | "false" |

Where Ancient Lore Meets Distant Galaxies
From Tolkien's Middle-earth, D&D multiverses, Warhammer 40,000, and Star Wars to ancient Norse dynasties, cyberpunk firearms, and narrative planet descriptions.
Specialized Procedural Generators
Search and explore all 907 C++17 procedural name generator modules. Every module is compiled with zero runtime heap allocation into .rodata.
Belts
armourGenerate Armour Belts style names
Boots
armourGenerate Armour Boots style names
Chests
armourGenerate Armour Chests style names
Cloaks
armourGenerate Armour Cloaks style names
Gauntlets
armourGenerate Armour Gauntlets style names
Helmets
armourGenerate Armour Helmets style names
Legs
armourGenerate Armour Legs style names
Pauldrons
armourGenerate Armour Pauldrons style names
Shields
armourGenerate Armour Shields style names
Vambraces
armourGenerate Armour Vambraces style names
Awokens
destinyGenerate Destiny Awokens style names
Cabals
destinyGenerate Destiny Cabals style names
Exos
destinyGenerate Destiny Exos style names
Fallens
destinyGenerate Destiny Fallens style names
Hives
destinyGenerate Destiny Hives style names
Humans
destinyGenerate Destiny Humans style names
Vexs
destinyGenerate Destiny Vexs style names
Angels
diabloGenerate Diablo Angels style names
Demons
diabloGenerate Diablo Demons style names
Khazras
diabloGenerate Diablo Khazras style names
Nephalems
diabloGenerate Diablo Nephalems style names
Daleks
doctor_whoGenerate Doctor Who Daleks style names
Gallifreyans
doctor_whoGenerate Doctor Who Gallifreyans style names
Ice Warriors
doctor_whoGenerate Doctor Who Ice Warriors style names
Raxacoricofallapatorians
doctor_whoGenerate Doctor Who Raxacoricofallapatorians style names
Silurians
doctor_whoGenerate Doctor Who Silurians style names
Sontarans
doctor_whoGenerate Doctor Who Sontarans style names
Zygons
doctor_whoGenerate Doctor Who Zygons style names
Dwarfs
dragon_ageGenerate Dragon Age Dwarfs style names
Elfs
dragon_ageGenerate Dragon Age Elfs style names
Humans
dragon_ageGenerate Dragon Age Humans style names
Qunaris
dragon_ageGenerate Dragon Age Qunaris style names
Frieza Clans
dragon_ballGenerate Dragon Ball Frieza Clans style names
Hakaishins
dragon_ballGenerate Dragon Ball Hakaishins style names
Humans
dragon_ballGenerate Dragon Ball Humans style names
Others
dragon_ballGenerate Dragon Ball Others style names
Saiyans
dragon_ballGenerate Dragon Ball Saiyans style names
Skians
dragon_ballGenerate Dragon Ball Skians style names
Tuffles
dragon_ballGenerate Dragon Ball Tuffles style names
Devas
dungeon_and_dragonsGenerate Dungeon And Dragons Devas style names
Dragonborns
dungeon_and_dragonsGenerate Dungeon And Dragons Dragonborns style names
Drows
dungeon_and_dragonsGenerate Dungeon And Dragons Drows style names
Dwarfs
dungeon_and_dragonsGenerate Dungeon And Dragons Dwarfs style names
Eladrins
dungeon_and_dragonsGenerate Dungeon And Dragons Eladrins style names
Elfs
dungeon_and_dragonsGenerate Dungeon And Dragons Elfs style names
Githzerais
dungeon_and_dragonsGenerate Dungeon And Dragons Githzerais style names
Gnomes
dungeon_and_dragonsGenerate Dungeon And Dragons Gnomes style names
Goliaths
dungeon_and_dragonsGenerate Dungeon And Dragons Goliaths style names
Technical Deep Dive
Zero-Allocation C++17 Architecture
How namgen achieves instant startup, zero runtime heap allocations, and sub-millisecond name generation.
Immutable .rodata Tables
Every word, prefix, suffix, and title across all 907 generators is compiled as static constexpr std::string_view arrays directly embedded into the binary’s .rodata section. No JSON parsing, no filesystem reads, and zero startup latency.
Zero-Heap Array Switching
To support runtime conditionals (such as male/female/neutral variants, or culture tables) without allocating std::vector, namgen uses a lightweight non-owning span:
struct ArrayView {
const std::string_view* data;
std::size_t length;
constexpr bool empty() const {
return length == 0;
}
};GeneratorRegistry Design
Rather than maintaining thousands of lines of fragile if/else ladders in namgen.cpp, generators register their canonical name, aliases, description, and lambda runner into a centralized GeneratorRegistry.

Adding a New Generator in 3 Steps
- 1Create Header: Define your generator signature in
src/<category>-<name>_lib.h:std::string generate_custom_name(std::mt19937& rng);
- 2Implement Module: Define your constexpr string tables and generation logic in
src/<category>-<name>_lib.cppusinggenerator_common.h. - 3Register in GeneratorRegistry: Add one registration entry in
src/generator_registry.cpp:registerGenerator({ "my_category-my_name", {"optional-alias"}, "Generate My Name style names", [](std::mt19937& rng) { return generate_custom_name(rng); } });