Skip to content

Quickstart

Already installed erdify? These are the commands you'll reach for most. Each links to the page with the full details.

Generate your first diagram

Point erdify at a directory; it finds models.py files recursively and prints a PlantUML ERD to stdout:

erdify ./src

Write it to a file instead:

erdify ./src -o docs/erd.puml

No installation? Run it on demand with uvx:

uvx erdify ./src -o erd.puml

Common recipes

# PlantUML and Mermaid in one run
erdify ./src -o docs/erd --format plantuml mermaid

# Only database-backed models (skip Pydantic/dataclass)
erdify ./src --sources sqlmodel sqlalchemy

# Drop noisy tables and skip migration folders
erdify ./src --exclude '*Link' audit_log --exclude-paths migrations

# Fail CI if the committed diagram is out of date
erdify ./src -o docs/erd.puml --check
Want to… See
Choose PlantUML / Mermaid / JSON / HTML Output Formats
Exclude entities, paths, or model kinds Filtering & Key Inference
Commit flags instead of typing them [tool.erdify] config
Render the diagram to an image Viewing the Diagram
Keep the ERD fresh in CI / pre-commit CI/CD & pre-commit
Generate diagrams from Python Python API

Next steps