2. Quick Start¶
Your first diagram in 5 minutes. You need qdbd installed.
2.1 Write (or paste) a schema¶
Save this as schema.txt. If you already have a schema in QuickDBD, copy it from QuickDBD's editor and paste it in unchanged.
Customer
-
CustomerId PK int
Name string
Email string UNIQUE
Order as o
----
OrderId PK int
CustomerId int FK >- Customer.CustomerId
OrderDate datetime
Total decimal(10,2)
A table is a name, a line of dashes, then one column per line: name type modifiers. FK >- Customer.CustomerId means many orders → one customer. Everything else is in 3.1 Schema Syntax.
2.2 Check it¶
Errors print as schema.txt:12: error: …, using QuickDBD's own messages, and exit with code 1. That makes the same command a CI gate (7. CI and Automation).

2.3 Edit it live¶
A browser tab opens with the diagram and an editor pane. The editor pane loads CodeMirror from a CDN, so it needs internet; the diagram itself works offline.
- Edit in the pane and press Save (or Ctrl/Cmd+S), or edit in your own editor and save there. Either save updates the file, the error panel and the diagram together. With errors, the diagram is empty until they are fixed.
- Drag tables to arrange them. Positions are saved to
schema.layout.json; commit it with the schema (3.4 Table Positions). - Stop the server with Ctrl+C.

2.4 Build a page to share¶
schema.html is one self-contained file. Open it locally, email it, attach it to a ticket, or, where your data policy allows, publish it on GitHub Pages (7.4). To send a link instead, turn sharing on and run qdbd share schema.txt (4.4 Sharing a Link: it's off by default). It needs the GitHub CLI, gh, installed and logged in (gh auth login).
In the page, click a table to see its details, type +Order in the filter, or press Link to copy a URL to exactly what you're looking at. The tour is in 4.1 Reading the Diagram.


2.5 Export an image¶
qdbd export schema.txt -o schema.png # whole diagram: .png, .svg or .drawio
qdbd export schema.txt --focus Order --depth 1 -o order.svg # one table and its neighbours
.drawio files open in diagrams.net as editable ER shapes. More: 4.3 Exports.


2.6 Where next¶
| You want to… | Go to |
|---|---|
| Use a schema written in DBML (dbdiagram.io) | 3.2 DBML |
| Split a big schema into several files | 3.3 Many Files, One Diagram |
| Filter to part of the schema, or find how two tables join | 4.2 Selecting Tables, 4.1 Reading the Diagram |
| Generate the schema from a dbt project | 5.1 dbt Import |
| Send someone a link to the diagram | 4.4 Sharing a Link |
| See what a branch changes | 6. Reviewing Changes |
| Run it on every pull request | 7. CI and Automation |
| Let an AI agent (Claude, Copilot, Cursor) query the schema | 3.7 AI Agents (MCP) |