# peggyjs/peggy

Peggy: Parser generator for JavaScript

Repository: https://github.com/peggyjs/peggy
Canonical: https://ross.abutalabs.com/products/peggy
Homepage: https://peggyjs.org/
Language: JavaScript
License: MIT
License Family: permissive
Topics: parser, peg, pegjs
Last push: 2026-03-19T13:14:46+00:00

## Health v2 (maintenance only)
Score: 78/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 73, release rhythm 72, longevity 100
- inputs: {"age_days": 2111, "days_push": 167, "days_rel": 185, "gap_med": 22.0, "n_releases_24m": 11}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1176, forks 78 (observed 2026-08-28T04:03:52.573551+00:00)

## What it is
Peggy is a parser generator for JavaScript based on parsing expression grammars (PEG), producing fast parsers with excellent error reporting. It is the actively maintained successor to PEG.js and can be used from the command line, browser, or JavaScript API.

## Use cases
- generate a parser from a PEG grammar in JavaScript
- build a DSL interpreter or compiler in Node.js
- parse custom config or data file formats
- migrate a project from PEG.js to a maintained parser generator
- pre-generate a parser at build time with no runtime dependency
- experiment with grammars in an online editor

## When to choose
- you need a parser for a custom language or data format in JavaScript/TypeScript
- you want strong error reporting out of the box
- you want a PEG.js-compatible, actively maintained tool
- you prefer pre-generating parsers at build time for speed

## When to avoid
- you need parser combinators or a runtime parser library style rather than code generation
- you need LR/LALR-style ambiguity handling rather than PEG semantics
- you are not working in a JavaScript runtime

## Facets
- artifact type: library
- maturity: active
- function: parser, compiler, cli, developer-tools
- domain: parsers, programming-languages, developer-tools, web-development
- platform: browser, cli, cross-platform
- tags: peg, parser-generator, grammar, pegjs-successor, typescript-types, source-maps, nodejs

## Member repositories
- peggyjs/peggy (main) score 78

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:52.573551+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:26:36.026983+00:00, confidence not recorded.
  - readme: https://github.com/peggyjs/peggy (fetched 2026-08-28T04:03:52.573551+00:00, sha dc056d59234c)
  - homepage: https://peggyjs.org/ (fetched 2026-08-29T12:33:04.250095+00:00, sha a2db2fff9fae)
  - site_page: https://peggyjs.org/documentation.html (fetched 2026-08-29T12:33:04.259787+00:00, sha 1730d480a0a0)
  - registry_npm: https://registry.npmjs.org/peggy (fetched 2026-08-29T12:33:04.264110+00:00, sha 521c563a18fc)
- Data as of 2026-08-30T08:39:29.467469+00:00.
