WizERD generates beautiful, readable ER diagrams from PostgreSQL schema dumps. Point it at a pg_dump file and get a perfectly organized SVG — no manual layout, no line mess, no overlap. Ever.
Most ER diagram tools produce unreadable tangles the moment your schema grows past a handful of tables. WizERD uses the ELK layout engine to guarantee zero overlap and minimize edge crossings at any scale.
- Zero overlap — tables never render on top of each other
- Smart routing — orthogonal edges with minimal crossings
- 13 built-in themes — dark, light, monochrome, and more
- Flexible spacing — compact, standard, or spacious
- Comprehensive schema support — includes tables, views, indexes, and sequences
- Column details — shows data types and PK/FK/IDX/SEQ markers
- CI-friendly — runs unattended in pipelines or scripts
- Python 3.9+
- Node.js 18+ (used by the ELK layout engine)
brew tap Pork0594/WizERD
brew install wizerdpip install wizerdgit clone https://github.com/Pork0594/WizERD.git
cd WizERD
pip install -e ".[dev]"
cd wizerd/layout && npm ci && cd ../..wizerd generate schema.sql -o diagram.svgPoint it at a pg_dump or pg_dumpall output and you're done.
wizerd generate schema.sql -o diagram.svgWizERD ships with 13 built-in themes.
# See all available themes
wizerd themes
# Apply a theme
wizerd generate schema.sql -t light
wizerd generate schema.sql -t dracula
wizerd generate schema.sql -t nordwizerd generate schema.sql -w compact # Tight layout
wizerd generate schema.sql -w standard # Default
wizerd generate schema.sql -w spacious # More breathing roomwizerd generate schema.sql --show-edge-labelsHighlights edges by which table they point to, making complex schemas easier to trace.
wizerd generate schema.sql --color-by-trunkUseful for debugging your schema or piping into other tools.
wizerd parse schema.sql > schema.jsonwizerd init # Creates .wizerd.yaml with common options
wizerd init -t full # Full template with every available optionSettings are resolved in this order, with later sources taking priority:
- Built-in defaults
~/.wizerd.yaml— home directory global config.wizerd.yaml— project directory config--config <path>— explicit config file- CLI flags — always win
export WIZERD_THEME=light
export WIZERD_OUTPUT=diagram.svg
export WIZERD_SPACING_PROFILE=compactwizerd validate .wizerd.yamlwizerd defaults
wizerd defaults --format json
wizerd defaults --format env| Option | Short | Type | Default | Description |
|---|---|---|---|---|
--output |
-o |
path | diagram.svg |
Output file path |
--theme |
-t |
string | default-dark |
Theme name (run wizerd themes for options) |
--spacing-profile |
-w |
string | standard |
Layout density: compact, standard, spacious |
--show-edge-labels |
-l |
bool | false |
Show FK constraint names on edges |
--color-by-trunk |
-e |
bool | false |
Color edges by FK target table |
--indexes |
— | bool | false |
Include indexes in the diagram |
--views |
— | bool | false |
Include views as separate nodes |
--sequences |
— | bool | false |
Include sequences for auto-increment columns |
--config |
-c |
path | — | Explicit path to a config file |
WizERD ships with example schemas in dev/dumps/examples/:
| File | Tables | Description |
|---|---|---|
simple_schema.sql |
2 | Users and posts — good for getting started |
schema.sql |
20+ | Music streaming platform |
large_schema.sql |
50+ | Complex multi-domain schema |
make install-all # Set up venv, Python deps, and Node.js
make check # Lint + typecheck + tests
make example # Generate a demo diagramSee CONTRIBUTING.md for full contribution guidelines.
MIT — see LICENSE.
