Skip to main content

quickdbd-cli (qdbd)

Compile QuickDBD-syntax schema files into interactive HTML ER diagrams, with no table limit, from the command line. Built to stay readable at 200+ tables.

Customer
-
CustomerId PK int
Name string

Order
-
OrderId PK int
CustomerId int FK >- Customer.CustomerId
pipx install quickdbd-cli        # or: uvx --from quickdbd-cli qdbd ...
qdbd build schema.txt -o schema.html

Not affiliated with QuickDBD. It reads the same text syntax, so schemas move freely between the two.

Features

  • Same syntax as QuickDBD: tables, aliases, quoted names, all 9 relationship operators, rel lines, PK/FK/NULL/UNIQUE/INDEX/IDENTITY, default=, doc comments, [settings] and [layout] sections. Error messages are QuickDBD's own.
  • Interactive page:
    • search and jump to a table (/)
    • minimap
    • click a table to focus on it and its neighbours
    • collapse tables: full / keys only / names only
    • hover a column to highlight its relationship
    • PNG/SVG export buttons
  • Live editing: qdbd serve reloads when you save, has a browser editor pane with autosave, and remembers where you drag tables.
  • Many files, one diagram: point it at a folder and foreign keys can cross files.
  • Pip-only install: no Graphviz, Node or browser needed. Layout uses ELK, running in an embedded V8.
  • CI-friendly: builds are deterministic, and errors are file:line: error: … with exit code 1.

Commands

qdbd check  PATH... [--strict]                 # validate; "No errors found. Good job!"
qdbd build  PATH... -o diagram.html            # shareable interactive HTML (positions locked)
qdbd serve  PATH... [--port 8765]              # live editor + drag-to-arrange
qdbd export PATH... -o out.png [--focus Customer --depth 1]   # PNG or SVG image
qdbd layout PATH... [--reset]                  # (re)write the layout file

PATH is a .txt file or a folder. Every *.txt under a folder is read recursively.

Table positions

The first build auto-arranges the tables. In qdbd serve, drag tables where you want them. Positions are saved to a sidecar file you can commit:

  • schema.txt → schema.layout.json
  • a folder → <folder>/qdbd.layout.json
  • override either with --layout FILE

Once a layout exists, a new table is placed next to the tables it's related to, and nothing else moves. Run qdbd layout PATH --reset to re-arrange everything from scratch. A pasted schema's QuickDBD [layout] section is used for any table the sidecar doesn't cover.

qdbd build never writes the sidecar, so CI builds leave the working tree clean.

Differences from QuickDBD

qdbd accepts a few things QuickDBD rejects, and prints a warning for each one:

  • tab characters
  • decimal(10, 2) (a space inside a type)
  • an explicit NOT NULL
  • indented table names
  • [layout] entries for unknown tables

qdbd check --strict turns these warnings into errors, so a file that passes is guaranteed to paste into QuickDBD.

default= values keep their case, where QuickDBD lowercases them.

CI

pre-commit:

repos:
  - repo: https://github.com/MarkPhamm/quickdbd-cli
    rev: v0.1.0
    hooks:
      - id: qdbd-check
        files: ^schema/.*\.txt$   # point at your schema files

GitHub Actions:

- uses: actions/setup-python@v5
  with: { python-version: "3.12" }
- run: pip install quickdbd-cli
- run: qdbd check schema/
- run: qdbd build schema/ -o site/schema.html
- uses: actions/upload-artifact@v4
  with: { name: schema-diagram, path: site/schema.html }

GitLab CI:

erd:
  image: python:3.12
  script:
    - pip install quickdbd-cli
    - qdbd check schema/
    - qdbd build schema/ -o public/schema.html
  artifacts:
    paths: [public/schema.html]

Development

uv venv && uv pip install -e ".[dev]"
.venv/bin/pytest
python scripts/gen_schema.py        # regenerate examples/synthetic (200 tables)
python scripts/gen_font_metrics.py  # regenerate font width table

Design notes: docs/superpowers/specs/2026-10-17-qdbd-design.md.

License

Apache-2.0. Bundled third-party files are listed in NOTICE.

Metadata

Release files for quickdbd-cli 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for quickdbd-cli 0.1.0
File Size Uploaded Provenance
quickdbd_cli-0.1.0.tar.gz 1.2 MB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for quickdbd-cli 0.1.0
File Interpreter ABI Platform
quickdbd_cli-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 2.3 MB

Release files / quickdbd_cli-0.1.0.tar.gz

Download URL quickdbd_cli-0.1.0.tar.gz
Size 1.2 MB
Tags Source
SHA-256 checksum
How to use checksums
c3ed285170751efdeaa234843d5ab39653ff4ce6f80988b83a178d2b8c341fe4
BLAKE2b-256 checksum
How to use checksums
7bfea422b3ba0d2585415c299d7231739051a8a215804988d39f9290e6d64f9c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.15

Release files / quickdbd_cli-0.1.0-py3-none-any.whl

Download URL quickdbd_cli-0.1.0-py3-none-any.whl
Size 1.2 MB
Tags Python 3
SHA-256 checksum
How to use checksums
bb68e2d608f7768cf128f0f1d6519a7dd351c3a74c91edc1577a805e30b211bd
BLAKE2b-256 checksum
How to use checksums
f96a59878a4cca73290a63537ed05e87e20050768566619cdc4774f160f973fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.15

Security for quickdbd-cli 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page