Malarky

Generate syntactically plausible English nonsense, steered by lexicons.

Malarky is a faker-like library and CLI that produces grammatically correct English text that sounds meaningful but isn’t. Perfect for placeholder text, testing, creative writing prompts, procedural content generation, and corporate buzzword bingo.

Get Started View on GitHub


Features

  • Syntactically correct – Proper grammar, subject-verb agreement, punctuation
  • Lexicon-driven – Guide output with custom vocabularies and style presets
  • Deterministic – Seedable RNG for reproducible output
  • Configurable – Control sentence types, lengths, complexity
  • Output transforms – Pipe text through built-in transforms (Pig Latin, leet speak, pirate, and more)
  • Traceable – Debug mode shows exactly how text was generated
  • Full CLI – Generate text, apply transforms, and validate lexicons from the command line
  • Zero dependencies – Works standalone or with @faker-js/faker

Quick taste

import { TextGenerator, SimpleFakerAdapter } from 'malarky';

const generator = new TextGenerator({
  fakerAdapter: new SimpleFakerAdapter(),
});

generator.setSeed(42);
console.log(generator.sentence());
// "Generally, the change called."
malarky sentence --seed 42
# "Generally, the change called."

Explore the docs

Section What you’ll find
Getting Started Installation, first generator, CLI quick start
CLI Reference All commands, options, and examples
API Reference TextGenerator class, options, types, morphology utilities
Lexicons Custom vocabularies, schema reference, archetypes
Output Transforms 10 built-in transforms, chaining, custom transforms
Guides Sentence types, determinism, tracing, faker integration
Configuration GeneratorConfig defaults and tuning
MCP Server Use Malarky as a tool from any LLM via MCP

Back to top

Malarky © 2026. Distributed under the MIT License.

This site uses Just the Docs, a documentation theme for Jekyll.