git-native · ontology-anchored · dbt-core

The modeling layer dbt-core is missing

Design entities and relationships in git, generate contract-enforced dbt, and catch drift before it ships. One model every tool reads and writes — the CLI, the canvas, VS Code, and CI.

# no cloud warehouse needed — the demo builds on a bundled DuckDB
$ uv tool install 'modelith-dbt[ontology]'
$ mdl init my-model
$ mdl generate # → contract-enforced dbt
See it

Six flows, end to end

Every command and every line of output below is real. Nothing is mocked.

01 · Design-first

From a blank repo to running dbt

Scaffold a model, add entities (ULIDs minted for you), validate, and compile to contract-enforced dbt — plus an ODCS data contract from the same model.

mdl init · new entity · validate · generate
02 · Adopt a warehouse

Reverse a legacy dbt project into a clean model

Point it at a warehouse with no data model. It excludes staging, detects SCD2 and Data Vault, strips surrogate keys, and logs every inference in a reviewable ledger.

mdl reverse --project target/manifest.json
03 · The drift gate

Model and warehouse, always in lockstep

A column lands in the warehouse. Drift classifies it — additive, not breaking — and reconcile folds the safe change into the model. Nothing is ever lost.

mdl drift --check · --reconcile
04 · Ontology anchoring

Align to an industry vocabulary

Search FIBO (or any OLS / OntoPortal / Collibra source), align an entity to a standard term, and track coverage — anchored, reproducible, offline.

mdl ontology search · align · status
05 · Erwin import

Bring an erwin model into git

Import an erwin XML export straight into clean logical YAML you can version, diff, and generate from. The migration path off a legacy modeling tool.

mdl import erwin fund.xml -o fund
06 · One model, many targets

A contract factory

From one definition: contract-enforced dbt, an ODCS data contract, Pydantic models, SQL DDL, Mermaid, DBML, RDF/SHACL, and a Neo4j graph schema — each deterministic.

mdl generate · export · emit
Why

Meaning lives in one place, in git

Warehouse teams scatter their meaning across an ER tool that never sees production, dbt SQL that drifts from the design, and a catalog nobody edits. Modelith collapses them into one model every surface reads and writes.

Contract-enforced dbt

Generate dbt-core models with enforced contracts, key constraints, and relationship tests. Regeneration runs a three-way merge, so hand edits and generated blocks both survive.

Drift as a CI gate

Compare the committed model to the compiled warehouse. Breaking / additive / cosmetic, classified in seconds. --check fails the PR; --reconcile folds the safe deltas back in.

Reverse any warehouse

A live database, a dbt manifest, or raw SQL DDL, lifted into a clean model — SCD2 and Data Vault detected, surrogates stripped, every inference reviewable.

Ontology-anchored

A four-layer vocabulary stack with SKOS alignments and provenance. Pin bundles like dependencies; resolve against OLS, OntoPortal, or Collibra — reproducibly, offline.

Structural git merge

A ULID-keyed merge driver: two people add different attributes to the same entity and merge clean. A rename is one cosmetic change, not a delete-plus-add.

Every surface is a client

The model is plain YAML in git. The CLI, the web canvas, the VS Code extension, and CI all read and write it — none of them owns state.

Model once, ship many

One model compiles to every target it needs

Each generated deterministically from the single definition.

dbt-coremdl generate
ODCS data contractmdl export contract
Pydanticmdl emit pydantic
Neo4j graphmdl export graph
Semantic layermdl emit semantic
RDF / SHACLmdl export rdf
SQL DDLmdl export sql
Mermaid ERDmdl export mermaid
DBMLmdl export dbml

Try it in two minutes

No cloud warehouse. The IBoR demo ships a model and a dbt project over a bundled DuckDB, so it builds on a laptop.