Skip to content

Installation

Lanexio Parser packages are distributed through npm under the @lanexio scope. The minimum Node.js version is 24.15.0.

PackageWhat it does
@lanexio/parserMain entry point: createParser, toyParse, streaming and edit helpers.
@lanexio/parser-coreLexTree, LexNode, LexCursor, the shared buffer protocol, tree writers.
@lanexio/parser-grammar-htmlparseHtml, serializeHtml, HtmlKind, HtmlField.
@lanexio/parser-grammar-markdownparseMarkdown, serializeMarkdown, MdKind.
@lanexio/parser-grammar-yamlparseYaml, YamlKind. YAML 1.2.2.
@lanexio/parser-grammar-jsonparseJson, JsonKind, JsonField. RFC 8259.
@lanexio/parser-grammar-cssparseCss, CssKind, CssField. CSS Syntax Level 3.
@lanexio/parser-queryLexQuery pattern engine.
@lanexio/parser-cliCLI binary lanexio-parser (alias parser): parse/query/serialize.
@lanexio/parser-wasmWASM grammar-pack contract, loaders, and the bundled toy demo grammar.
@lanexio/parser-grammar-kitGrammar authoring toolkit: metadata validation + kind-module codegen (grammar-kit CLI).

Install the packages you need. Most projects need only grammar-html and/or grammar-markdown.

Terminal window
pnpm add @lanexio/parser-grammar-html
Terminal window
pnpm add @lanexio/parser-grammar-markdown
Terminal window
pnpm add @lanexio/parser-grammar-html @lanexio/parser-grammar-markdown
Terminal window
pnpm add -g @lanexio/parser-cli

Lanexio Parser requires Node.js 24.15.0 or later. Versions below 24 are not supported.

Terminal window
node --version # must print v24.15.0 or higher

All grammar packages require parser-core. It is installed automatically as a dependency — you don’t need to list it separately.

PackageRequired byVersion
@lanexio/parser-coreevery grammar package, parser-query, parser, parser-cli^1.0.0

All packages ship as ESM only. There is no CommonJS build. If your project uses require(), you need a bundler that supports ESM interop or a dynamic import().