Design a property graph once. Generate every schema from it.
Documentation · Marketplace · Model format · Design notes
A VS Code extension and CLI for authoring Labeled Property Graph schemas as text, viewing them as ERD-like diagrams, and generating database DDL and RDF artifacts from a single model.
- Authors the model as reviewable YAML, validated by a contributed JSON Schema — so completion and hover come from the YAML tooling you already have.
- Edits it on a canvas beside the file. Every canvas action becomes a targeted text splice, applied as a workspace edit. Coordinates live in a sidecar, so moving a box produces no semantic diff.
- Generates seven targets from one model: LadybugDB DDL, Neo4j constraints, SHACL shapes, and an OWL ontology — plus three standards artifacts, GQL graph types (ISO/IEC 39075), PG-Schema, and LinkML.
- Reports every downgrade. Anything a target cannot enforce becomes an editor diagnostic and a comment at the lossy line of the artifact. Nothing disappears quietly.
- Models lists, enums, open types and cardinality — and cardinality is genuinely enforced where it can be: LadybugDB rejects a violating write, and SHACL bounds both directions.
- Stays interoperable. The model file is self-describing, its scalar types answer to their GQL names, and the JSON Schema is 2020-12 — so a model is readable outside this tool, not only inside it.
- Runs in CI. The same validation, with no editor present, so a pull request can be gated on schema validity.
Full feature tour: https://volland.github.io/lpg-modeler/
From the VS Code Marketplace:
code --install-extension pavlyshyn.lpg-modelerThe CLI, for continuous integration:
npx lpg check model/domain.lpg.yaml
npx lpg emit model/domain.lpg.yaml --target ladybug --out schemaA monorepo of three packages.
| Package | Holds |
|---|---|
packages/core |
Parsing, the intermediate representation, resolution, validation, targeted edits, and every generator |
packages/cli |
The lpg command, wrapping core for continuous integration |
packages/vscode |
The extension: webview canvas, diagnostics, commands |
core must never import vscode — enforced by an ESLint rule and by a test that scans the
source. That single rule is what keeps generator tests runnable in plain Node with no editor
harness. See the design notes.
npm install
npm run build # builds core, then cli, then the extension and its webview
npm test # vitest, across all packages
npm run lintTo run the extension from source, open the repository in VS Code and launch the Run Extension target, or package it:
cd packages/vscode
npx @vscode/vsce package --no-dependenciesThe extension bundle is self-contained — esbuild inlines @lpg/core into
out/extension.js, so --no-dependencies is correct rather than a shortcut.
Every generator has golden-file tests for output stability. The Ladybug target additionally executes its generated DDL against an in-process LadybugDB instance and asserts that the declared constraints really do reject invalid data — a golden file alone only proves that output has not changed, not that it is valid.
Architecture and design intent live in lat.md/, a cross-linked knowledge graph
maintained with lat.md. Run lat check before opening
a pull request. The published website is generated from docs/.
MIT — see LICENSE.
