Skip to content
@pegmill

pegmill

PEG parser generator for TypeScript. PEG grammars as LLM output constraints.

peg ::= mill

Parser infrastructure for the TypeScript stack. Apache 2.0. No VC, no corporate sponsor.

Projects

  • pegmill — PEG parser generator with parametric rules. Drop-in for PEG.js 0.10.0. npm install pegmill.
  • pegmill.github.io — landing with roadmap and comparison against Outlines, XGrammar, and llama.cpp GBNF.

Why this exists

Constrained decoding for open-weight LLMs lives in Python (Outlines) or C++ (XGrammar, llama.cpp GBNF). TypeScript has no equivalent with full PEG expressiveness. Pegmill fills that gap.

Support

A star helps. A link from your own project docs helps more. GitHub Sponsors and zag@cpan.org for anything bigger.

Popular repositories Loading

  1. pegmill pegmill Public

    PEG grammars as LLM output constraints. TypeScript-native parser generator with parametric rules.

    JavaScript 4 1

  2. pegmill.github.io pegmill.github.io Public

    Landing page for Pegmill — PEG grammars as LLM output constraints

    HTML

  3. .github .github Public

    Community health and organization profile

Repositories

Showing 3 of 3 repositories

Top languages

Loading…

Most used topics

Loading…