Skip to content

Packages

Lexiconlang is a pnpm workspace of independent, publishable packages. Pull in what you need; tree-shaking takes care of the rest.

Core primitives

PackageWhat it provides
@lexiconlang/coresfc32 RNG, Context tree, Generator<T> interface, composition primitives, alias-method sampling
@lexiconlang/grammarTracery-compatible JSON grammars + TS tagged-template DSL with 16 built-in modifiers
@lexiconlang/markovCharacter n-gram trainer + sampler with backoff smoothing and verbatim-rejection

Language system

PackageWhat it provides
@lexiconlang/languagePhonotactics, lexicon generation, morpheme packs, name templates, TranslatedName API
@lexiconlang/glyphsVisual writing systems: SVG / Unicode / Canvas glyphs with per-culture registries

Genre packs

Each pack is a curated set of cultures, name generators, and worldbuilding content for a setting.

PackageCultures & content
@lexiconlang/fantasy5 races (dwarvish/elvish/orcish/halfling/draconic), NPCs, settlements, taverns, factions, dragons, ~35 generators total
@lexiconlang/scifi9 alien species, star systems, ships, megacorps, ~15 generators
@lexiconlang/modernPeople with email/phone/address, cities, streets, companies, bands, books, ~16 generators

Tooling

PackageWhat it provides
@lexiconlang/clilexiconlang binary — build-markov, scaffold-pack

Common properties

All packages are:

  • ESM-only (no CJS)
  • sideEffects: false (tree-shakeable)
  • Zero native deps
  • TypeScript-first with full type definitions
  • Node ≥ 20 or any modern browser

Released under the MIT License.