PostgreSQL ER diagram generator with zero-overlap layouts
Project description
WizERD
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.
Why WizERD?
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
Installation
Requirements
- Python 3.9+
- Node.js 18+ (used by the ELK layout engine)
Homebrew (macOS)
brew tap Pork0594/WizERD
brew install wizerd
pip
pip install wizerd
From Source
git clone https://github.com/Pork0594/WizERD.git
cd WizERD
pip install -e ".[dev]"
cd wizerd/layout && npm ci && cd ../..
Quick Start
wizerd generate schema.sql -o diagram.svg
Point it at a pg_dump or pg_dumpall output and you're done.
Usage
Generate a Diagram
wizerd generate schema.sql -o diagram.svg
Themes
WizERD 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 nord
Layout Density
wizerd generate schema.sql -w compact # Tight layout
wizerd generate schema.sql -w standard # Default
wizerd generate schema.sql -w spacious # More breathing room
Foreign Key Labels
wizerd generate schema.sql --show-edge-labels
Color by Relationship Target
Highlights edges by which table they point to, making complex schemas easier to trace.
wizerd generate schema.sql --color-by-trunk
Parse & Inspect
Useful for debugging your schema or piping into other tools.
wizerd parse schema.sql > schema.json
Configuration
Generate a Config File
wizerd init # Creates .wizerd.yaml with common options
wizerd init -t full # Full template with every available option
Config Precedence
Settings 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
Environment Variables
export WIZERD_THEME=light
export WIZERD_OUTPUT=diagram.svg
export WIZERD_SPACING_PROFILE=compact
Validate Your Config
wizerd validate .wizerd.yaml
Show Defaults
wizerd defaults
wizerd defaults --format json
wizerd defaults --format env
Configuration Reference
| 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 |
Example Schemas
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 |
Development
make install-all # Set up venv, Python deps, and Node.js
make check # Lint + typecheck + tests
make example # Generate a demo diagram
See CONTRIBUTING.md for full contribution guidelines.
License
MIT — see LICENSE.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wizerd-0.4.1.tar.gz.
File metadata
- Download URL: wizerd-0.4.1.tar.gz
- Upload date:
- Size: 1.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c44db06025e1979587605eb365e1a0dd0af607e85e8e4538878490b0a65a1229
|
|
| MD5 |
8fc84d9ea417ffb77701aa3a389874f2
|
|
| BLAKE2b-256 |
07574370b4dfd6f96e59ee444f8173f65b95d2e78777ac643ce494ffd821ed24
|
File details
Details for the file wizerd-0.4.1-py3-none-any.whl.
File metadata
- Download URL: wizerd-0.4.1-py3-none-any.whl
- Upload date:
- Size: 1.8 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d5621af41b6b8ac016ae4a97dd427516017c9e4fe389d4ee1a70e22ee329db2e
|
|
| MD5 |
7b6745a3c816ded00fe4f1da43ef2c30
|
|
| BLAKE2b-256 |
84a1abed5879942a71010d0a520e99569ee54f049211993e1c3421bac7e39278
|