Guide¶
qdbd turns database schemas into interactive ER diagrams that stay readable at hundreds of tables. Write the schema in QuickDBD's plain-text syntax or DBML, or generate it from a dbt project. qdbd checks it, lays it out, and builds a single HTML page you can explore, share and review in pull requests.
The schema is a text file, so it lives in git next to your code. Diagrams are generated from it and never edited by hand. Table positions are the only thing you arrange yourself, and they're saved in a small layout file so the diagram stays put.
Live demos 200-table demo Quick start
The workflow¶
dbt project ──qdbd import dbt──┐
├──▶ schema/*.txt, *.dbml ──▶ canonical source (QuickDBD syntax or DBML, in git)
hand-written / pasted ─────────┘ │
├──▶ qdbd check : QuickDBD-compatible validation ──▶ CI gate
├──▶ qdbd serve : live editor, drag to arrange ──▶ schema.layout.json
├──▶ qdbd build : interactive HTML ──▶ GitHub Pages / artifact
├──▶ qdbd diff : what changed vs main ──▶ PR comment
├──▶ qdbd export : PNG · SVG · draw.io ──▶ docs, slides, wikis
└──▶ qdbd mcp : schema tools for AI agents ──▶ Claude, Copilot, Cursor
Step-by-step swimlanes for each use case, from a first diagram to pull request review, are in User Flows.
Every command reads the same schema files, so the page, the images and the PR comment always agree. The GitHub Action runs check, build and diff on every pull request.
The guide¶
Read it in order the first time; each step builds on the one before.
| # | Section | You'll learn |
|---|---|---|
| 1 | Install | Install with pip, pipx or uv, or run without installing |
| 2 | Quick Start | Write, check, edit, build and export your first diagram in 5 minutes |
| 3 | Schema Files | The syntax, splitting a schema into files, table positions, tags and colours, VS Code and AI agents |
| 4 | Exploring a Diagram | Reading the page, filtering with selectors, exports, and sharing a link |
| 5 | dbt Projects | Generate the schema from manifest.json, then follow jaffle_shop from import to CI |
| 6 | Reviewing Changes | What a branch changes, as a report and highlighted in the diagram |
| 7 | CI and Automation | The GitHub Action, GitHub Pages, pre-commit and other CI systems |
| 8 | CLI Reference | Every command and exit code |
| 9 | Development | Working on qdbd itself |
| 10 | User Flows | Swimlane diagrams of each use case, from a first diagram to pull request review |
-
New to qdbd?
Install it, build a first diagram.
-
Using dbt?
Generate the schema from dbt.
-
Got a diagram?
What the colours and panels mean.
-
Reviewing changes?
Diffs on GitHub and GitLab.
The pieces¶
| Piece | What it does |
|---|---|
| Schema syntax | QuickDBD's text format, accepted unchanged. Error messages match QuickDBD's |
qdbd check |
Validates every file; file:line: error: …, exit 1 on errors |
qdbd serve |
Local editor: reloads on save, browser editor pane, drag tables to arrange |
qdbd layout |
Writes table positions to the layout file: places new tables, or lays out everything again |
qdbd build |
One self-contained HTML page: search, filters, path finder, regions, shareable links |
qdbd share |
Publishes the page as a secret GitHub gist and prints the link (off by default) |
qdbd export |
PNG, SVG and editable draw.io files, for a whole schema or a selection |
qdbd diff |
Tables, columns and relationships changed against a git ref |
qdbd path |
Shortest join path between two tables, as a SQL JOIN |
qdbd import dbt |
Schema files from a dbt manifest.json (+ catalog.json) |
qdbd convert |
QuickDBD text to DBML and back |
qdbd mcp |
The schema as tools for AI agents: tables, joins as SQL, checks, diffs |
| GitHub Action | Check, build and comment on pull requests |
Pip-only: no Graphviz, Node or browser to install. Layout uses the Eclipse Layout Kernel in an embedded JavaScript engine.
