Open source graph rewriting engine
Graph Grammar
Author rewrite rules, match subgraphs, and transform graphs , a fast, framework-agnostic engine for TypeScript.
Why graph-grammar
Section titled “Why graph-grammar”Framework-agnostic
The engine has no DOM or framework dependencies, just
zod. Use it in Node, the browser, or a worker.Fast
O(1) label buckets, an allocation-free VF2-style matcher, and single-match rewriting keep parallel-growth grammars O(N), ~116,000 steps/s to 50k nodes.
Expressive rules
Property predicates, negative application conditions, edge embedding, property expressions, and four application strategies.
Validated I/O
Import and export grammars as JSON with runtime
zod validation built in.Install
Section titled “Install”npm install graph-grammargraph-grammar is built and maintained by Kiberon Labs.
Built by Kiberon Labs