
Conlang
- 340 installs
- 133 repo stars
- Updated February 24, 2026
- jwynia/agent-skills
Design constructed languages with phonology, morphology, syntax, writing systems, and in-world usage notes so speculative fiction worlds feel linguistically coherent and internally consistent.
About
Guides Claude through constructed-language creation for fiction: sound inventories, word-formation patterns, sentence structure, orthography options, sample translations, and a maintainable conlang bible authors reuse while drafting and revising speculative manuscripts.
- Phonology and phonotactics design
- Morphology and syntax rules
- Writing system concepts
- Lexicon and etymology tracking
- In-world naming conventions
Conlang by the numbers
- 340 all-time installs (skills.sh)
- +7 installs in the week ending Aug 2, 2026 (Skillselion tracking)
- Ranked #486 of 1,335 Generative Media skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/jwynia/agent-skills --skill conlangAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 340 |
|---|---|
| repo stars | ★ 133 |
| Last updated | February 24, 2026 |
| Repository | jwynia/agent-skills ↗ |
What it does
Design constructed languages with phonology, morphology, syntax, writing systems, and in-world usage notes so speculative fiction worlds feel linguistically coherent and internally consistent.
Files
Conlang: Language Generation Skill
You generate constructed languages for fiction writers. Your role is to create phonologically consistent language foundations—phoneme inventories, syllable structures, and sample vocabulary—that make names and dialogue feel like they come from a coherent linguistic system.
Core Principle
Languages fail when names don't sound like they belong together.
Good constructed languages create the perception that all words came from the same system—even if the writer never defines grammar. Bad constructed languages are inconsistent: names that could be from any language, sounds that don't recur, patterns that shift arbitrarily.
The Language States
When diagnosing, identify which state applies:
State L1: No Language
Symptoms: Generic fantasy names with no consistency; "Zarthok" and "Jenny" in the same culture; no phonological identity. Key Questions: What sounds define this culture? What syllable patterns should recur? Interventions: Generate phoneme inventory at flavor complexity; establish basic sound palette.
State L2: Relexified English
Symptoms: Conlang is English with different words; grammar follows English patterns; no alien concepts. Key Questions: What would be grammatically different? What concepts have no English equivalent? Interventions: Evolutionary Language Framework for deeper linguistic development.
State L3: Inconsistent Phonology
Symptoms: Names don't sound like they're from the same language; sound inventory shifts between words; no recurring patterns. Key Questions: Which phonemes are in this language? Which are NOT? What syllable shapes are allowed? Interventions: Generate phoneme inventory; document allowed sounds; regenerate inconsistent names.
State L4: Missing Depth
Symptoms: Language lacks registers (formal/informal); no dialect variation; no historical layers. Key Questions: How do power differences show in speech? Are there regional variants? What's archaic? Interventions: Evolutionary Language Framework for sociolinguistic development.
State L5: Biology Mismatch
Symptoms: Non-human species speaks human-optimized language; sounds require human vocal tract; concepts assume human cognition. Key Questions: What sounds can this species produce? What concepts would their cognition prioritize? Interventions: Alien Sensory Framework + custom phoneme inventory based on biology.
Diagnostic Process
When a writer needs language help:
1. Identify the need - What's the language for? (Names only? Dialogue? Full grammar?) 2. Match complexity - flavor (quick names), naming (consistent vocabulary), full (grammar-ready) 3. Check for existing constraints - Any established names? Species biology? Cultural context? 4. Generate foundation - Phoneme inventory and syllable structure 5. Create samples - Generate words to demonstrate the sound 6. Document for consistency - Save seed for reproducibility
Key Diagnostic Questions
For Naming Languages
- How many names do you need?
- What "feel" should the language have? (Flowing? Guttural? Clicking?)
- Any sounds to definitely include or exclude?
- Are there existing names that must fit?
For Dialogue
- How much conlang will appear in text?
- Will readers need to pronounce words?
- Should meaning be inferable from context?
- Any "signature phrases" needed?
For Non-Human Speakers
- What vocal apparatus does this species have?
- What sensory modalities dominate their cognition?
- What concepts would be linguistically marked?
- What would be literally untranslatable to humans?
For Historical Depth
- How old is this language?
- What other languages has it contacted?
- What social changes have shaped it?
- Are there "dead" or liturgical variants?
Complexity Levels
Flavor (10-15 consonants, 3-5 vowels)
Use for: Quick names, background cultures, brief references Time: 5 minutes Output: Sound palette + syllable patterns + 10-20 sample names Limitations: Not enough for extended dialogue or grammar
Naming (15-22 consonants, 5-7 vowels)
Use for: Main character names, place names, consistent vocabulary Time: 15 minutes Output: Full phoneme inventory + syllable templates + 50+ sample words Limitations: Grammar not defined; extended sentences may feel inconsistent
Full (20-35 consonants, 7-12 vowels)
Use for: Languages that will be examined closely, grammar development Time: 30+ minutes Output: Complete sound system + syllable rules + phonotactic constraints Enables: Morphology development, grammar rules, translation exercises
Anti-Patterns
The Relexification
Problem: Conlang is just English with different words; "I love you" → "Mi amor tu" Fix: Identify concepts that should be grammaticalized differently; use Evolutionary Language Framework.
The Kitchen Sink
Problem: Too many exotic features; clicks AND tones AND ejectives AND vowel harmony Fix: Pick 1-2 distinctive features; most natural languages are "boring" in most ways.
The Inconsistent Phonotactics
Problem: "Kthor" exists but so does "Alina"—incompatible syllable structures Fix: Define syllable templates FIRST; regenerate names that don't fit.
The Unpronounceable
Problem: Readers can't sound out names; "Xq'tkhl" stops the reading flow Fix: Use simpler syllable structures; keep consonant clusters manageable; include vowels.
The Apostrophe Catastrophe
Problem: Apostrophes everywhere with no consistent meaning; "K'tar'nak'vul" Fix: If using apostrophes, define what they mean (glottal stop? syllable break?); use sparingly.
The Human Alien
Problem: Alien species has human phonology; they can say "s" perfectly but have no lips Fix: Start with biology; trace to vocal apparatus; derive possible sounds.
Available Tools
phonology.ts
Generates phoneme inventories based on cross-linguistic frequency data.
# Generate flavor-complexity inventory
deno run --allow-read scripts/phonology.ts --complexity flavor
# Generate naming inventory with reproducible seed
deno run --allow-read scripts/phonology.ts --complexity naming --seed 12345
# Use an elvish-like preset
deno run --allow-read scripts/phonology.ts --preset elvish_like
# Full complexity with tonal features
deno run --allow-read scripts/phonology.ts --complexity full --features tonesOutput: Consonant inventory, vowel inventory, syllable templates, seed for reproduction.
words.ts
Generates words from a phoneme inventory.
# Generate 20 words using default inventory
deno run --allow-read scripts/words.ts --count 20
# Generate from saved inventory
deno run --allow-read scripts/words.ts --inventory language.json --count 50
# Specify syllable count range
deno run --allow-read scripts/words.ts --syllables 2-3 --seed 42
# Generate categorized words (names, places, short, long)
deno run --allow-read scripts/words.ts --categoriesOutput: Generated words with optional syllable breakdown.
Piped Workflow
# Generate inventory, then words
deno run --allow-read scripts/phonology.ts --json | deno run --allow-read scripts/words.ts --count 30Example Diagnostic Interactions
Writer: "I need names for my elf culture but they all sound random."
Your approach: 1. Identify State L3 (Inconsistent Phonology) 2. Ask: "What sounds feel 'elvish' to you? Any existing names you love?" 3. Generate: phonology.ts --preset elvish_like --complexity naming 4. Review inventory with writer; adjust if needed 5. Generate: words.ts --categories for sample names 6. Document: Save seed for consistency across the project
Writer: "My aliens have two vocal tracts—how should their language sound?"
Your approach: 1. Identify State L5 (Biology Mismatch) 2. Ask: "What sounds can each vocal tract make? Can they produce sound simultaneously?" 3. Explore: What this enables (harmony, two independent streams, etc.) 4. Generate custom inventory based on biological capabilities 5. Consider: What human sounds would be impossible for them? 6. Integrate: Reference Alien Sensory Framework for cognitive implications
Writer: "I just need quick names for background characters."
Your approach: 1. Identify: Flavor complexity is sufficient 2. Generate: phonology.ts --complexity flavor --seed [timestamp] 3. Generate: words.ts --syllables 2-3 --count 20 4. Deliver: Word list with note to save seed if they want more later
Output Persistence
This skill writes primary output to files so work persists across sessions.
Output Discovery
Before doing any other work:
1. Check for context/output-config.md in the project 2. If found, look for this skill's entry 3. If not found or no entry for this skill, ask the user first:
- "Where should I save output from this conlang session?"
- Suggest:
explorations/conlang/or a sensible location for this project
4. Store the user's preference:
- In
context/output-config.mdif context network exists - In
.conlang-output.mdat project root otherwise
Primary Output
For this skill, persist:
- Phonology definition - consonants, vowels, syllable templates
- Generated vocabulary - word lists with meanings
- Seeds used - for regenerating consistent results
- Language parameters - complexity level, cultural implications
Conversation vs. File
| Goes to File | Stays in Conversation |
|---|---|
| Phonology specification | Discussion of sound preferences |
| Vocabulary lists | Iteration on word choices |
| Generation seeds | Real-time feedback |
| Usage guidelines | Writer's naming decisions |
File Naming
Pattern: {language-name}-{date}.md Example: elvish-dialect-2025-01-15.md
What You Do NOT Do
- You do not develop full grammar unless asked
- You do not require linguistics knowledge from the writer
- You do not insist on "authenticity" over usability
- You diagnose, generate, and explain—the writer decides what works
Integration with Story-Sense
Language problems often underlie character/world problems:
| Story-Sense State | May Actually Be |
|---|---|
| State 2: World Without Life | L1-L3 (language inconsistency breaks immersion) |
| State 3: Flat Non-Humans | L5 (language too human for species) |
| State 4: Characters Without Dimension | L4 (no sociolinguistic variation) |
When story-sense diagnosis leads to language problems, hand off to conlang diagnostic.
Integration with Worldbuilding
Language reflects world systems:
- Economy → vocabulary for trade, value, resources
- Power → registers, honorifics, forbidden words
- Belief → sacred language, taboo concepts, liturgical registers
- Geography → dialect variation, contact languages, trade pidgins
- History → archaic layers, borrowed words, language death
When worldbuilding cascade affects language, generate vocabulary for affected domains.
Quick Reference: Phoneme Selection
Always Safe (Universal)
Consonants: p, t, k, m, n, s, l, r, w, j Vowels: a, i, u
Good Additions (Common)
Consonants: b, d, g, f, ʃ, h, ŋ, ʔ, tʃ Vowels: e, o
For Flavor (Less Common)
Consonants: v, z, x, ɲ, ts Vowels: ɛ, ɔ, ə
Distinctive Choices (Rare)
Consonants: θ, ð, q, ɬ Vowels: æ, ɯ, œ, y
Syllable Quick Reference
| Feel | Templates | Example Pattern |
|---|---|---|
| Flowing | CV, CVV | ta-ri-a, se-lo |
| Balanced | CV, CVC | kor-tan, me-lik |
| Complex | CCVC, CVCC | strak, kelth |
| Minimal | CV only | ka-ra-na |
{
"_meta": {
"description": "Simplified phoneme frequency data derived from PHOIBLE cross-linguistic patterns",
"source": "Adapted from conlang-generator project using PHOIBLE database concepts",
"usage": "Use with phonology.ts to generate realistic phoneme inventories"
},
"consonants": {
"stops": {
"description": "Plosive consonants - complete airflow stoppage",
"voiceless": {
"p": { "frequency": 0.83, "place": "bilabial", "tier": "universal" },
"t": { "frequency": 0.98, "place": "alveolar", "tier": "universal" },
"k": { "frequency": 0.93, "place": "velar", "tier": "universal" },
"q": { "frequency": 0.15, "place": "uvular", "tier": "rare" },
"ʔ": { "frequency": 0.45, "place": "glottal", "tier": "common" }
},
"voiced": {
"b": { "frequency": 0.64, "place": "bilabial", "tier": "common" },
"d": { "frequency": 0.72, "place": "alveolar", "tier": "common" },
"g": { "frequency": 0.58, "place": "velar", "tier": "common" },
"ɢ": { "frequency": 0.05, "place": "uvular", "tier": "rare" }
}
},
"fricatives": {
"description": "Consonants with turbulent airflow",
"voiceless": {
"f": { "frequency": 0.42, "place": "labiodental", "tier": "common" },
"s": { "frequency": 0.85, "place": "alveolar", "tier": "universal" },
"ʃ": { "frequency": 0.35, "place": "postalveolar", "tier": "common" },
"x": { "frequency": 0.25, "place": "velar", "tier": "less_common" },
"h": { "frequency": 0.72, "place": "glottal", "tier": "common" },
"θ": { "frequency": 0.08, "place": "dental", "tier": "rare" }
},
"voiced": {
"v": { "frequency": 0.32, "place": "labiodental", "tier": "common" },
"z": { "frequency": 0.28, "place": "alveolar", "tier": "less_common" },
"ʒ": { "frequency": 0.18, "place": "postalveolar", "tier": "less_common" },
"ɣ": { "frequency": 0.15, "place": "velar", "tier": "less_common" },
"ð": { "frequency": 0.05, "place": "dental", "tier": "rare" }
}
},
"nasals": {
"description": "Consonants with nasal airflow",
"m": { "frequency": 0.96, "place": "bilabial", "tier": "universal" },
"n": { "frequency": 0.98, "place": "alveolar", "tier": "universal" },
"ŋ": { "frequency": 0.52, "place": "velar", "tier": "common" },
"ɲ": { "frequency": 0.28, "place": "palatal", "tier": "less_common" },
"ɴ": { "frequency": 0.08, "place": "uvular", "tier": "rare" }
},
"liquids": {
"description": "Laterals and rhotics",
"l": { "frequency": 0.78, "place": "alveolar", "tier": "universal" },
"r": { "frequency": 0.75, "place": "alveolar", "tier": "universal" },
"ɾ": { "frequency": 0.45, "place": "alveolar", "tier": "common", "note": "tap/flap" },
"ɭ": { "frequency": 0.12, "place": "retroflex", "tier": "less_common" },
"ɽ": { "frequency": 0.10, "place": "retroflex", "tier": "less_common" },
"ʎ": { "frequency": 0.15, "place": "palatal", "tier": "less_common" }
},
"glides": {
"description": "Semivowels/approximants",
"j": { "frequency": 0.88, "place": "palatal", "tier": "universal" },
"w": { "frequency": 0.82, "place": "labial-velar", "tier": "universal" }
},
"affricates": {
"description": "Stop + fricative combinations",
"voiceless": {
"tʃ": { "frequency": 0.38, "place": "postalveolar", "tier": "common" },
"ts": { "frequency": 0.28, "place": "alveolar", "tier": "less_common" }
},
"voiced": {
"dʒ": { "frequency": 0.25, "place": "postalveolar", "tier": "less_common" },
"dz": { "frequency": 0.12, "place": "alveolar", "tier": "rare" }
}
}
},
"vowels": {
"description": "Vowel inventory organized by commonality",
"universal": {
"description": "Found in nearly all languages - include these at minimum",
"phonemes": ["a", "i", "u"]
},
"common": {
"description": "Very frequently occurring - good defaults",
"phonemes": ["e", "o"]
},
"extended": {
"description": "Moderately common - add for richer inventory",
"phonemes": ["ɛ", "ɔ", "ə", "ɪ", "ʊ"]
},
"less_common": {
"description": "Less frequent - use for distinctive flavor",
"phonemes": ["æ", "ɯ", "œ", "ʌ", "ɑ", "y"]
},
"positions": {
"front": ["i", "ɪ", "e", "ɛ", "æ", "y", "œ"],
"central": ["ə", "ɐ", "ʌ"],
"back": ["u", "ʊ", "o", "ɔ", "ɑ", "ɯ"]
},
"height": {
"high": ["i", "ɪ", "u", "ʊ", "ɯ", "y"],
"mid": ["e", "ə", "o", "ɛ", "ɔ", "œ", "ʌ"],
"low": ["a", "æ", "ɑ", "ɐ"]
}
},
"exotic_features": {
"description": "Optional features for non-standard inventories",
"ejectives": {
"description": "Consonants with glottalic egressive airstream",
"complexity": 0.35,
"examples": ["pʼ", "tʼ", "kʼ", "tsʼ", "tʃʼ"],
"common_in": ["Caucasian", "Afro-Asiatic", "Mayan"]
},
"implosives": {
"description": "Consonants with glottalic ingressive airstream",
"complexity": 0.30,
"examples": ["ɓ", "ɗ", "ɠ"],
"common_in": ["African", "South Asian"]
},
"clicks": {
"description": "Consonants with velaric ingressive airstream",
"complexity": 0.80,
"examples": ["ǃ", "ǂ", "ǁ", "ʘ"],
"common_in": ["Khoisan", "Bantu (borrowed)"]
},
"tones": {
"description": "Pitch distinctions that change word meaning",
"complexity": 0.40,
"register": ["high", "mid", "low"],
"contour": ["rising", "falling", "dipping", "peaking"],
"common_in": ["Sino-Tibetan", "Niger-Congo", "Austro-Asiatic"]
},
"aspirated": {
"description": "Consonants with following puff of air",
"complexity": 0.20,
"examples": ["pʰ", "tʰ", "kʰ"],
"common_in": ["Indo-Aryan", "Chinese", "Korean"]
}
},
"complexity_presets": {
"flavor": {
"description": "Minimal language for names and phrases - quick to use",
"consonants": { "target": 12, "min": 10, "max": 15 },
"vowels": { "target": 5, "min": 3, "max": 6 },
"recommended_consonants": ["p", "t", "k", "m", "n", "s", "l", "r", "w", "j", "h"],
"recommended_vowels": ["a", "e", "i", "o", "u"],
"avoid_features": ["clicks", "ejectives", "implosives", "tones"]
},
"naming": {
"description": "Consistent language for character/place naming",
"consonants": { "target": 18, "min": 15, "max": 22 },
"vowels": { "target": 7, "min": 5, "max": 9 },
"recommended_consonants": ["p", "b", "t", "d", "k", "g", "m", "n", "ŋ", "f", "s", "ʃ", "h", "l", "r", "w", "j", "tʃ"],
"recommended_vowels": ["a", "e", "i", "o", "u", "ə", "ɛ"],
"optional_features": ["aspirated"]
},
"full": {
"description": "Complete language with grammar potential",
"consonants": { "target": 25, "min": 20, "max": 35 },
"vowels": { "target": 9, "min": 7, "max": 12 },
"recommended_consonants": "all tiers through common",
"recommended_vowels": "all tiers through extended",
"optional_features": ["aspirated", "ejectives", "tones"]
}
},
"language_family_patterns": {
"description": "Characteristic sounds by language family (simplified)",
"romance": {
"characteristic": ["voiced/voiceless stop pairs", "no /h/", "five vowels"],
"avoid": ["θ", "ð", "ŋ word-initial"],
"example_languages": ["Spanish", "Italian", "Portuguese"]
},
"germanic": {
"characteristic": ["/h/", "consonant clusters", "front rounded vowels (some)"],
"common": ["f", "v", "θ", "ð", "s", "z"],
"example_languages": ["English", "German", "Dutch"]
},
"slavic": {
"characteristic": ["palatalization", "consonant clusters", "ʃ/ʒ distinction"],
"common": ["tʃ", "ʃ", "ʒ", "ts"],
"example_languages": ["Russian", "Polish", "Czech"]
},
"semitic": {
"characteristic": ["pharyngeal consonants", "emphatic consonants", "three root consonants"],
"common": ["ʔ", "ħ", "ʕ", "q"],
"example_languages": ["Arabic", "Hebrew"]
},
"sino_tibetan": {
"characteristic": ["tones", "aspiration contrast", "limited codas"],
"common": ["tones", "aspirated stops"],
"example_languages": ["Mandarin", "Cantonese", "Tibetan"]
},
"polynesian": {
"characteristic": ["small consonant inventory", "no clusters", "CV syllables"],
"avoid": ["voiced stops", "fricatives except h", "consonant clusters"],
"example_languages": ["Hawaiian", "Maori", "Samoan"]
},
"japanese": {
"characteristic": ["no clusters", "limited codas", "CV(n) syllables"],
"common": ["gemination", "palatalization"],
"avoid": ["l (use r)", "v", "θ", "ð"],
"example_languages": ["Japanese"]
}
},
"tiers": {
"description": "Frequency tiers for phoneme selection",
"universal": {
"description": "Found in 85%+ of languages - always safe to include",
"consonants": ["p", "t", "k", "m", "n", "s", "l", "r", "w", "j"],
"vowels": ["a", "i", "u"]
},
"common": {
"description": "Found in 50-85% of languages - good defaults",
"consonants": ["b", "d", "g", "f", "ʃ", "h", "ŋ", "ʔ", "tʃ"],
"vowels": ["e", "o"]
},
"less_common": {
"description": "Found in 20-50% of languages - adds flavor",
"consonants": ["v", "z", "x", "ɲ", "ɾ", "ts"],
"vowels": ["ɛ", "ɔ", "ə", "ɪ", "ʊ"]
},
"rare": {
"description": "Found in <20% of languages - distinctive choices",
"consonants": ["θ", "ð", "q", "ɢ", "ɴ", "ɬ"],
"vowels": ["æ", "ɯ", "œ", "y"]
}
}
}
{
"_meta": {
"description": "Syllable structure templates for constructed language generation",
"notation": "C = consonant, V = vowel, (C) = optional consonant, CC = cluster",
"usage": "Use with phonology.ts and words.ts to generate consistent word shapes"
},
"complexity_levels": {
"simple": {
"description": "Easy to pronounce, minimal clusters - good for most fiction",
"templates": ["CV", "CVC", "V", "VC"],
"max_onset": 1,
"max_coda": 1,
"example_languages": ["Japanese", "Hawaiian", "Swahili"],
"notes": "Readers can easily sound out names; very accessible"
},
"moderate": {
"description": "Some clusters allowed - English-like complexity",
"templates": ["CV", "CVC", "CVCC", "CCV", "CCVC", "V", "VC", "VCC"],
"max_onset": 2,
"max_coda": 2,
"example_languages": ["Spanish", "Italian", "Greek"],
"notes": "Familiar to English readers; good balance of variety"
},
"complex": {
"description": "Rich cluster possibilities - Slavic or Germanic feel",
"templates": ["CV", "CVC", "CVCC", "CVCCC", "CCV", "CCVC", "CCVCC", "CCCV", "CCCVC"],
"max_onset": 3,
"max_coda": 3,
"example_languages": ["Russian", "Polish", "Georgian", "German"],
"notes": "Can create imposing, complex-sounding names"
}
},
"presets": {
"japanese_like": {
"description": "Strict CV pattern with optional final n",
"templates": ["CV", "V", "CVn"],
"max_onset": 1,
"max_coda": 1,
"coda_only": ["n"],
"notes": "Very regular, melodic quality",
"word_patterns": ["CVCV", "CVCVCV", "CVCVn", "VCV"]
},
"hawaiian_like": {
"description": "Open syllables only, very limited consonants",
"templates": ["CV", "V"],
"max_onset": 1,
"max_coda": 0,
"notes": "Flowing, vowel-heavy words",
"word_patterns": ["CVCV", "VCVCV", "CVCVCV", "VCV"]
},
"latin_like": {
"description": "Classical Latin-esque patterns",
"templates": ["CV", "CVC", "CCV", "V", "VC"],
"max_onset": 2,
"max_coda": 1,
"allowed_onsets": ["pr", "tr", "kr", "br", "dr", "gr", "pl", "kl", "bl", "gl", "sp", "st", "sk"],
"notes": "Formal, classical feel",
"word_patterns": ["CVCVC", "CVCCV", "CCVCV", "CVCVS"]
},
"arabic_like": {
"description": "Semitic patterns with consonant clusters",
"templates": ["CV", "CVC", "CVVC", "CVCC"],
"max_onset": 1,
"max_coda": 2,
"notes": "Consonant-heavy, root-based feel",
"word_patterns": ["CVCVC", "CVCCVC", "CVVCVC"]
},
"english_like": {
"description": "Complex clusters, varied patterns",
"templates": ["CV", "CVC", "CVCC", "CCVC", "CCVCC", "CCCVC", "V", "VC", "VCC"],
"max_onset": 3,
"max_coda": 4,
"allowed_onsets": ["str", "spr", "skr", "spl", "tr", "dr", "kr", "gr", "pr", "br", "fr", "θr", "ʃr", "sl", "sm", "sn", "sp", "st", "sk", "sw"],
"notes": "Familiar but varied",
"word_patterns": ["CVC", "CVCC", "CCVC", "CVCVC", "CCVCVC"]
},
"elvish_like": {
"description": "Tolkien-inspired flowing patterns",
"templates": ["CV", "CVC", "CVV", "V", "VC"],
"max_onset": 1,
"max_coda": 1,
"preferred_consonants": ["l", "r", "n", "m", "s", "t", "d", "w"],
"preferred_vowels": ["a", "e", "i", "o", "u", "ə"],
"notes": "Flowing, musical quality with diphthongs",
"word_patterns": ["CVCV", "CVVCV", "VCVCV", "CVCVC"]
},
"harsh_fantasy": {
"description": "Orcish/Klingon-inspired guttural patterns",
"templates": ["CVC", "CVCC", "CCVC", "CVCCC"],
"max_onset": 2,
"max_coda": 3,
"preferred_consonants": ["k", "g", "ʔ", "x", "ɣ", "q", "r", "ŋ"],
"avoided_consonants": ["l", "w", "j"],
"notes": "Aggressive, harsh-sounding",
"word_patterns": ["CVCC", "CCVCC", "CVCCC", "CCVCCC"]
}
},
"cluster_rules": {
"description": "Phonotactic constraints for consonant clusters",
"sonority_hierarchy": {
"description": "Sonority rises toward nucleus, falls toward coda",
"levels": {
"1": ["p", "t", "k", "b", "d", "g", "q", "ʔ"],
"2": ["f", "v", "s", "z", "ʃ", "ʒ", "x", "h", "θ", "ð"],
"3": ["m", "n", "ŋ", "ɲ"],
"4": ["l", "r", "ɾ", "ɭ", "ɽ"],
"5": ["j", "w"],
"6": ["vowels"]
},
"notes": "Onset clusters should rise in sonority; coda clusters should fall"
},
"common_onsets": {
"two_consonant": ["pr", "pl", "tr", "tw", "kr", "kl", "kw", "br", "bl", "dr", "gr", "gl", "gw", "fr", "fl", "θr", "sp", "st", "sk", "sm", "sn", "sl", "sw", "ʃr"],
"three_consonant": ["str", "spr", "spl", "skr", "skw"]
},
"common_codas": {
"single": ["p", "t", "k", "m", "n", "ŋ", "s", "l", "r"],
"two_consonant": ["pt", "kt", "st", "sk", "sp", "nt", "nd", "mp", "ŋk", "lp", "lt", "lk", "rp", "rt", "rk", "ps", "ts", "ks", "ns", "ls", "rs"],
"three_consonant": ["nts", "kst", "mps", "ŋks"]
},
"illegal_clusters": {
"description": "Clusters that violate sonority or are very rare",
"examples": ["dl", "tl", "sr", "ʃn", "pw", "bw", "fw"]
}
},
"word_structure": {
"description": "Full word patterns built from syllables",
"monosyllabic": {
"templates": ["CV", "CVC", "CVCC", "CCVC"],
"notes": "Good for particles, pronouns, common words"
},
"disyllabic": {
"templates": ["CVCV", "CVCCV", "CVCVC", "CCVCV", "VCVC"],
"notes": "Most common word length in many languages"
},
"trisyllabic": {
"templates": ["CVCVCV", "CVCCVCV", "CVCVCVC", "VCVCV"],
"notes": "Common for nouns and verbs"
},
"polysyllabic": {
"templates": ["CVCVCVCV", "CVCVCVCVC"],
"notes": "Longer words, compounds, formal registers"
}
},
"stress_patterns": {
"description": "Where emphasis falls in words",
"initial": {
"description": "Stress on first syllable",
"example_languages": ["Finnish", "Czech", "Hungarian"],
"effect": "Steady, predictable rhythm"
},
"penultimate": {
"description": "Stress on second-to-last syllable",
"example_languages": ["Spanish", "Polish", "Swahili"],
"effect": "Natural, balanced feel"
},
"final": {
"description": "Stress on last syllable",
"example_languages": ["French", "Turkish"],
"effect": "Forward momentum, rising patterns"
},
"weight_sensitive": {
"description": "Stress depends on syllable structure",
"example_languages": ["Latin", "Arabic", "Hindi"],
"effect": "Complex but predictable patterns"
}
}
}
#!/usr/bin/env -S deno run --allow-read
/**
* Phoneme Inventory Generator
*
* Generates linguistically plausible phoneme inventories for constructed languages.
* Uses PHOIBLE-derived frequency data to select phonemes based on cross-linguistic patterns.
*
* Usage:
* deno run --allow-read phonology.ts --complexity flavor
* deno run --allow-read phonology.ts --complexity naming --seed 12345
* deno run --allow-read phonology.ts --preset elvish_like
* deno run --allow-read phonology.ts --family romance --features aspirated
*/
import { dirname, fromFileUrl, join } from "https://deno.land/std@0.208.0/path/mod.ts";
// Types
interface PhonemeData {
frequency: number;
place: string;
tier: string;
note?: string;
}
interface PhonemeInventory {
consonants: string[];
vowels: string[];
syllableTemplates: string[];
features: string[];
metadata: {
complexity: string;
seed: number;
consonantCount: number;
vowelCount: number;
preset?: string;
family?: string;
};
}
// Seeded random number generator
class SeededRandom {
private seed: number;
constructor(seed: number) {
this.seed = seed;
}
next(): number {
this.seed = (this.seed * 1103515245 + 12345) & 0x7fffffff;
return this.seed / 0x7fffffff;
}
shuffle<T>(array: T[]): T[] {
const result = [...array];
for (let i = result.length - 1; i > 0; i--) {
const j = Math.floor(this.next() * (i + 1));
[result[i], result[j]] = [result[j], result[i]];
}
return result;
}
pick<T>(array: T[], count: number): T[] {
return this.shuffle(array).slice(0, count);
}
pickWeighted<T>(items: { item: T; weight: number }[], count: number): T[] {
const totalWeight = items.reduce((sum, i) => sum + i.weight, 0);
const selected: T[] = [];
const remaining = [...items];
while (selected.length < count && remaining.length > 0) {
let random = this.next() * remaining.reduce((sum, i) => sum + i.weight, 0);
for (let i = 0; i < remaining.length; i++) {
random -= remaining[i].weight;
if (random <= 0) {
selected.push(remaining[i].item);
remaining.splice(i, 1);
break;
}
}
}
return selected;
}
}
// Load data files
async function loadData(): Promise<{ phonemes: any; syllables: any }> {
const scriptDir = dirname(fromFileUrl(import.meta.url));
const dataDir = join(scriptDir, "..", "data");
const phonemesPath = join(dataDir, "phoneme-frequencies.json");
const syllablesPath = join(dataDir, "syllable-templates.json");
const phonemes = JSON.parse(await Deno.readTextFile(phonemesPath));
const syllables = JSON.parse(await Deno.readTextFile(syllablesPath));
return { phonemes, syllables };
}
// Extract all consonants from phoneme data with weights
function extractConsonants(data: any): { phoneme: string; weight: number; tier: string }[] {
const consonants: { phoneme: string; weight: number; tier: string }[] = [];
// Stops
for (const [phoneme, info] of Object.entries(data.consonants.stops.voiceless || {})) {
const i = info as PhonemeData;
consonants.push({ phoneme, weight: i.frequency, tier: i.tier });
}
for (const [phoneme, info] of Object.entries(data.consonants.stops.voiced || {})) {
const i = info as PhonemeData;
consonants.push({ phoneme, weight: i.frequency, tier: i.tier });
}
// Fricatives
for (const [phoneme, info] of Object.entries(data.consonants.fricatives.voiceless || {})) {
const i = info as PhonemeData;
consonants.push({ phoneme, weight: i.frequency, tier: i.tier });
}
for (const [phoneme, info] of Object.entries(data.consonants.fricatives.voiced || {})) {
const i = info as PhonemeData;
consonants.push({ phoneme, weight: i.frequency, tier: i.tier });
}
// Nasals
for (const [phoneme, info] of Object.entries(data.consonants.nasals || {})) {
if (phoneme === "description") continue;
const i = info as PhonemeData;
consonants.push({ phoneme, weight: i.frequency, tier: i.tier });
}
// Liquids
for (const [phoneme, info] of Object.entries(data.consonants.liquids || {})) {
if (phoneme === "description") continue;
const i = info as PhonemeData;
consonants.push({ phoneme, weight: i.frequency, tier: i.tier });
}
// Glides
for (const [phoneme, info] of Object.entries(data.consonants.glides || {})) {
if (phoneme === "description") continue;
const i = info as PhonemeData;
consonants.push({ phoneme, weight: i.frequency, tier: i.tier });
}
// Affricates
for (const [phoneme, info] of Object.entries(data.consonants.affricates?.voiceless || {})) {
const i = info as PhonemeData;
consonants.push({ phoneme, weight: i.frequency, tier: i.tier });
}
for (const [phoneme, info] of Object.entries(data.consonants.affricates?.voiced || {})) {
const i = info as PhonemeData;
consonants.push({ phoneme, weight: i.frequency, tier: i.tier });
}
return consonants;
}
// Generate inventory based on complexity
function generateInventory(
data: { phonemes: any; syllables: any },
options: {
complexity: string;
seed: number;
preset?: string;
family?: string;
features?: string[];
}
): PhonemeInventory {
const rng = new SeededRandom(options.seed);
const { phonemes, syllables } = data;
// Get complexity preset
const complexityPreset = phonemes.complexity_presets[options.complexity] || phonemes.complexity_presets.naming;
const targetConsonants = complexityPreset.consonants.target;
const targetVowels = complexityPreset.vowels.target;
// Get syllable complexity
const syllableComplexity = options.complexity === "flavor" ? "simple" :
options.complexity === "naming" ? "moderate" : "complex";
// Check for preset override
let syllablePreset = syllables.complexity_levels[syllableComplexity];
if (options.preset && syllables.presets[options.preset]) {
syllablePreset = syllables.presets[options.preset];
}
// Build consonant pool
const allConsonants = extractConsonants(phonemes);
// Filter by tier based on complexity
let tierFilter: string[];
switch (options.complexity) {
case "flavor":
tierFilter = ["universal", "common"];
break;
case "naming":
tierFilter = ["universal", "common", "less_common"];
break;
case "full":
default:
tierFilter = ["universal", "common", "less_common", "rare"];
}
const eligibleConsonants = allConsonants.filter(c => tierFilter.includes(c.tier));
// Select consonants weighted by frequency
const selectedConsonants = rng.pickWeighted(
eligibleConsonants.map(c => ({ item: c.phoneme, weight: c.weight })),
targetConsonants
);
// Build vowel pool
let vowelPool: string[] = [...phonemes.vowels.universal.phonemes];
if (targetVowels > 3) {
vowelPool = [...vowelPool, ...phonemes.vowels.common.phonemes];
}
if (targetVowels > 5) {
vowelPool = [...vowelPool, ...phonemes.vowels.extended.phonemes];
}
if (targetVowels > 8) {
vowelPool = [...vowelPool, ...phonemes.vowels.less_common.phonemes];
}
const selectedVowels = rng.pick(vowelPool, targetVowels);
// Determine features
const features: string[] = [];
if (options.features) {
features.push(...options.features);
}
return {
consonants: selectedConsonants.sort(),
vowels: selectedVowels.sort(),
syllableTemplates: syllablePreset.templates,
features,
metadata: {
complexity: options.complexity,
seed: options.seed,
consonantCount: selectedConsonants.length,
vowelCount: selectedVowels.length,
preset: options.preset,
family: options.family,
},
};
}
// Format output
function formatInventory(inventory: PhonemeInventory): string {
const lines: string[] = [];
lines.push(`# Phoneme Inventory\n`);
lines.push(`**Complexity:** ${inventory.metadata.complexity}`);
lines.push(`**Seed:** ${inventory.metadata.seed} (use this seed to regenerate)`);
if (inventory.metadata.preset) {
lines.push(`**Preset:** ${inventory.metadata.preset}`);
}
lines.push("");
lines.push(`## Consonants (${inventory.metadata.consonantCount})\n`);
lines.push(inventory.consonants.join(" "));
lines.push("");
lines.push(`## Vowels (${inventory.metadata.vowelCount})\n`);
lines.push(inventory.vowels.join(" "));
lines.push("");
lines.push(`## Syllable Structure\n`);
lines.push(`Templates: ${inventory.syllableTemplates.join(", ")}`);
lines.push("");
if (inventory.features.length > 0) {
lines.push(`## Special Features\n`);
lines.push(inventory.features.join(", "));
lines.push("");
}
lines.push(`## Usage Tips\n`);
lines.push("- Use the consonants and vowels to create names following the syllable templates");
lines.push("- CV = consonant + vowel, CVC = consonant + vowel + consonant, etc.");
lines.push("- For consistency, stick to these phonemes for all names in this culture/species");
lines.push("- Save this seed to regenerate the same inventory later");
return lines.join("\n");
}
// Main function
async function main(): Promise<void> {
const args = Deno.args;
if (args.includes("--help") || args.includes("-h")) {
console.log(`Phoneme Inventory Generator
Usage:
deno run --allow-read phonology.ts [options]
Options:
--complexity <level> Complexity level: flavor, naming, full (default: naming)
--seed <number> Seed for reproducible generation (default: random)
--preset <name> Use a preset style: japanese_like, hawaiian_like, latin_like,
arabic_like, english_like, elvish_like, harsh_fantasy
--family <name> Base on language family: romance, germanic, slavic, semitic,
sino_tibetan, polynesian, japanese
--features <list> Comma-separated optional features: aspirated, ejectives, tones
--json Output as JSON
Complexity Levels:
flavor - Minimal (10-15 consonants, 3-5 vowels) for quick names/phrases
naming - Standard (15-22 consonants, 5-7 vowels) for consistent naming
full - Complete (20-35 consonants, 7-12 vowels) for developed language
Examples:
deno run --allow-read phonology.ts --complexity flavor
deno run --allow-read phonology.ts --preset elvish_like --seed 42
deno run --allow-read phonology.ts --complexity full --features aspirated,tones
`);
Deno.exit(0);
}
// Parse arguments
const complexityIndex = args.indexOf("--complexity");
const seedIndex = args.indexOf("--seed");
const presetIndex = args.indexOf("--preset");
const familyIndex = args.indexOf("--family");
const featuresIndex = args.indexOf("--features");
const jsonOutput = args.includes("--json");
const complexity = complexityIndex !== -1 && args[complexityIndex + 1]
? args[complexityIndex + 1]
: "naming";
const seed = seedIndex !== -1 && args[seedIndex + 1]
? parseInt(args[seedIndex + 1], 10)
: Math.floor(Math.random() * 1000000);
const preset = presetIndex !== -1 ? args[presetIndex + 1] : undefined;
const family = familyIndex !== -1 ? args[familyIndex + 1] : undefined;
const features = featuresIndex !== -1 && args[featuresIndex + 1]
? args[featuresIndex + 1].split(",")
: undefined;
// Validate complexity
if (!["flavor", "naming", "full"].includes(complexity)) {
console.error(`Error: Unknown complexity level "${complexity}"`);
console.error("Available: flavor, naming, full");
Deno.exit(1);
}
// Load data and generate
try {
const data = await loadData();
const inventory = generateInventory(data, {
complexity,
seed,
preset,
family,
features,
});
if (jsonOutput) {
console.log(JSON.stringify(inventory, null, 2));
} else {
console.log(formatInventory(inventory));
}
} catch (error) {
console.error(`Error: ${error.message}`);
Deno.exit(1);
}
}
main();
#!/usr/bin/env -S deno run --allow-read
/**
* Word Generator
*
* Generates words from a phoneme inventory using syllable templates.
* Can use output from phonology.ts or custom phoneme sets.
*
* Usage:
* deno run --allow-read words.ts --count 20
* deno run --allow-read words.ts --inventory inventory.json --count 10
* deno run --allow-read words.ts --syllables 2-3 --seed 12345
* echo '{"consonants":["k","t","n"],"vowels":["a","i"]}' | deno run --allow-read words.ts
*/
import { dirname, fromFileUrl, join } from "https://deno.land/std@0.208.0/path/mod.ts";
// Types
interface PhonemeInventory {
consonants: string[];
vowels: string[];
syllableTemplates?: string[];
metadata?: {
seed?: number;
};
}
interface GeneratedWord {
word: string;
syllables: string[];
structure: string;
}
interface WordGenerationResult {
words: GeneratedWord[];
inventory: {
consonants: string[];
vowels: string[];
templates: string[];
};
metadata: {
count: number;
seed: number;
syllableRange: [number, number];
};
}
// Seeded random number generator
class SeededRandom {
private seed: number;
constructor(seed: number) {
this.seed = seed;
}
next(): number {
this.seed = (this.seed * 1103515245 + 12345) & 0x7fffffff;
return this.seed / 0x7fffffff;
}
pick<T>(array: T[]): T {
return array[Math.floor(this.next() * array.length)];
}
range(min: number, max: number): number {
return Math.floor(this.next() * (max - min + 1)) + min;
}
}
// Default simple inventory for quick use
const DEFAULT_INVENTORY: PhonemeInventory = {
consonants: ["p", "t", "k", "m", "n", "s", "l", "r", "w", "j", "h"],
vowels: ["a", "e", "i", "o", "u"],
syllableTemplates: ["CV", "CVC", "V", "VC"],
};
// Load syllable data
async function loadSyllableData(): Promise<any> {
try {
const scriptDir = dirname(fromFileUrl(import.meta.url));
const dataDir = join(scriptDir, "..", "data");
const syllablesPath = join(dataDir, "syllable-templates.json");
return JSON.parse(await Deno.readTextFile(syllablesPath));
} catch {
return null;
}
}
// Parse inventory from file or stdin
async function parseInventory(inventoryPath?: string): Promise<PhonemeInventory> {
if (inventoryPath) {
const content = await Deno.readTextFile(inventoryPath);
return JSON.parse(content);
}
// Check for piped input
if (!Deno.stdin.isTerminal()) {
const decoder = new TextDecoder();
const buffer = new Uint8Array(10000);
const n = await Deno.stdin.read(buffer);
if (n) {
const content = decoder.decode(buffer.subarray(0, n));
return JSON.parse(content);
}
}
return DEFAULT_INVENTORY;
}
// Generate a single syllable from template
function generateSyllable(
template: string,
consonants: string[],
vowels: string[],
rng: SeededRandom
): { syllable: string; structure: string } {
let syllable = "";
let structure = "";
for (const char of template) {
if (char === "C") {
syllable += rng.pick(consonants);
structure += "C";
} else if (char === "V") {
syllable += rng.pick(vowels);
structure += "V";
} else if (char === "n") {
// Special case for final nasal (e.g., Japanese-like)
syllable += "n";
structure += "n";
}
}
return { syllable, structure };
}
// Generate a word with specified syllable count
function generateWord(
inventory: PhonemeInventory,
templates: string[],
syllableCount: number,
rng: SeededRandom
): GeneratedWord {
const syllables: string[] = [];
const structures: string[] = [];
for (let i = 0; i < syllableCount; i++) {
const template = rng.pick(templates);
const { syllable, structure } = generateSyllable(
template,
inventory.consonants,
inventory.vowels,
rng
);
syllables.push(syllable);
structures.push(structure);
}
return {
word: syllables.join(""),
syllables,
structure: structures.join("-"),
};
}
// Generate multiple words
function generateWords(
inventory: PhonemeInventory,
options: {
count: number;
seed: number;
syllableRange: [number, number];
templates?: string[];
}
): WordGenerationResult {
const rng = new SeededRandom(options.seed);
// Use provided templates or defaults
const templates = options.templates ||
inventory.syllableTemplates ||
DEFAULT_INVENTORY.syllableTemplates!;
const words: GeneratedWord[] = [];
for (let i = 0; i < options.count; i++) {
const syllableCount = rng.range(options.syllableRange[0], options.syllableRange[1]);
words.push(generateWord(inventory, templates, syllableCount, rng));
}
return {
words,
inventory: {
consonants: inventory.consonants,
vowels: inventory.vowels,
templates,
},
metadata: {
count: options.count,
seed: options.seed,
syllableRange: options.syllableRange,
},
};
}
// Format output
function formatOutput(result: WordGenerationResult, showDetails: boolean): string {
const lines: string[] = [];
lines.push(`# Generated Words\n`);
lines.push(`**Seed:** ${result.metadata.seed}`);
lines.push(`**Syllables:** ${result.metadata.syllableRange[0]}-${result.metadata.syllableRange[1]}`);
lines.push(`**Count:** ${result.metadata.count}`);
lines.push("");
lines.push("## Words\n");
if (showDetails) {
for (const word of result.words) {
lines.push(`- **${word.word}** [${word.syllables.join("-")}] (${word.structure})`);
}
} else {
for (const word of result.words) {
lines.push(`- ${word.word}`);
}
}
lines.push("");
lines.push("## Inventory Used\n");
lines.push(`Consonants: ${result.inventory.consonants.join(" ")}`);
lines.push(`Vowels: ${result.inventory.vowels.join(" ")}`);
lines.push(`Templates: ${result.inventory.templates.join(", ")}`);
return lines.join("\n");
}
// Generate word categories
function generateCategories(
inventory: PhonemeInventory,
templates: string[],
seed: number
): Record<string, string[]> {
const rng = new SeededRandom(seed);
const categories: Record<string, { syllables: [number, number]; count: number }> = {
"Short (1-2 syllables)": { syllables: [1, 2], count: 5 },
"Medium (2-3 syllables)": { syllables: [2, 3], count: 5 },
"Long (3-4 syllables)": { syllables: [3, 4], count: 5 },
"Names (2-3 syllables)": { syllables: [2, 3], count: 10 },
"Places (2-4 syllables)": { syllables: [2, 4], count: 5 },
};
const result: Record<string, string[]> = {};
for (const [category, config] of Object.entries(categories)) {
const words: string[] = [];
for (let i = 0; i < config.count; i++) {
const count = rng.range(config.syllables[0], config.syllables[1]);
const word = generateWord(inventory, templates, count, rng);
words.push(word.word);
}
result[category] = words;
}
return result;
}
// Main function
async function main(): Promise<void> {
const args = Deno.args;
if (args.includes("--help") || args.includes("-h")) {
console.log(`Word Generator
Usage:
deno run --allow-read words.ts [options]
Options:
--inventory <file> Path to inventory JSON (from phonology.ts --json)
--count <number> Number of words to generate (default: 20)
--syllables <range> Syllable count range, e.g., "2-3" (default: 1-3)
--seed <number> Seed for reproducible generation (default: random)
--details Show syllable breakdown and structure
--categories Generate words in categories (names, places, etc.)
--json Output as JSON
Input:
Can read inventory from stdin: phonology.ts --json | words.ts --count 10
Examples:
deno run --allow-read words.ts --count 20
deno run --allow-read words.ts --inventory my-language.json --count 10
deno run --allow-read words.ts --syllables 2-4 --seed 42 --details
deno run --allow-read words.ts --categories
`);
Deno.exit(0);
}
// Parse arguments
const inventoryIndex = args.indexOf("--inventory");
const countIndex = args.indexOf("--count");
const syllablesIndex = args.indexOf("--syllables");
const seedIndex = args.indexOf("--seed");
const showDetails = args.includes("--details");
const showCategories = args.includes("--categories");
const jsonOutput = args.includes("--json");
const inventoryPath = inventoryIndex !== -1 ? args[inventoryIndex + 1] : undefined;
const count = countIndex !== -1 ? parseInt(args[countIndex + 1], 10) : 20;
const seed = seedIndex !== -1 ? parseInt(args[seedIndex + 1], 10) : Math.floor(Math.random() * 1000000);
// Parse syllable range
let syllableRange: [number, number] = [1, 3];
if (syllablesIndex !== -1 && args[syllablesIndex + 1]) {
const parts = args[syllablesIndex + 1].split("-").map(Number);
if (parts.length === 2 && !isNaN(parts[0]) && !isNaN(parts[1])) {
syllableRange = [parts[0], parts[1]];
}
}
try {
const inventory = await parseInventory(inventoryPath);
const syllableData = await loadSyllableData();
const templates = inventory.syllableTemplates ||
(syllableData?.complexity_levels?.moderate?.templates) ||
DEFAULT_INVENTORY.syllableTemplates!;
if (showCategories) {
const categories = generateCategories(inventory, templates, seed);
if (jsonOutput) {
console.log(JSON.stringify({ categories, seed }, null, 2));
} else {
console.log(`# Word Categories\n`);
console.log(`**Seed:** ${seed}\n`);
for (const [category, words] of Object.entries(categories)) {
console.log(`## ${category}\n`);
console.log(words.join(", "));
console.log("");
}
}
} else {
const result = generateWords(inventory, {
count,
seed,
syllableRange,
templates,
});
if (jsonOutput) {
console.log(JSON.stringify(result, null, 2));
} else {
console.log(formatOutput(result, showDetails));
}
}
} catch (error) {
console.error(`Error: ${error.message}`);
Deno.exit(1);
}
}
main();