https://github.com/pork0594/wizerd
Generate beautiful, zero-overlap ER diagrams from PostgreSQL schema dumps.
https://github.com/pork0594/wizerd
cli database devtools diagram erd postgresql schema svg visualization
Last synced: 3 months ago
JSON representation
Generate beautiful, zero-overlap ER diagrams from PostgreSQL schema dumps.
- Host: GitHub
- URL: https://github.com/pork0594/wizerd
- Owner: Pork0594
- License: mit
- Created: 2026-03-01T03:29:31.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2026-03-04T02:11:50.000Z (3 months ago)
- Last Synced: 2026-03-04T06:44:27.482Z (3 months ago)
- Topics: cli, database, devtools, diagram, erd, postgresql, schema, svg, visualization
- Language: Python
- Homepage:
- Size: 5.62 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# WizERD
WizERD is a PostgreSQL ER diagram generator that creates beautiful, readable diagrams with zero table overlap and minimal edge crossings.
## Why WizERD?
Most ER diagram generators fail with large databases (100+ tables). They produce overlapping tables and "line messes" that are impossible to parse. WizERD prioritizes visual legibility over compactness, ensuring your diagrams remain navigable regardless of database size.
## Features
- **Zero Overlap** — Tables never render on top of each other
- **Smart Routing** — Minimal relationship line crossovers
- **14 Built-in Themes** — From dark mode to minimal
- **Flexible Spacing** — Compact, standard, or spacious layouts
- **Column Details** — Shows data types, PKs, and FKs
- **Multiple Formats** — SVG and PNG output
- **Flexible Configuration** — YAML, JSON, environment variables, or CLI flags
## Quick Start
```bash
# Install
pip install wizerd
# Generate diagram
wizerd generate schema.sql -o diagram.svg
# Or with export features (PNG)
pip install wizerd[export]
wizerd generate schema.sql -o diagram.png
```
## Installation
See the [Installation Guide](docs/installation.md) for detailed instructions.
### Requirements
- Python 3.9+
- Node.js 18+ (for layout engine)
### From PyPI
```bash
pip install wizerd
pip install wizerd[export] # For PNG/PDF output
```
### From Source
```bash
git clone https://github.com/Pork0594/wizerd.git
cd wizerd
pip install -r requirements.txt
cd wizerd/layout && npm ci
```
## Usage
### Basic Usage
```bash
wizerd generate schema.sql -o diagram.svg
```
### Themes
```bash
# List available themes
wizerd themes
# Use a different theme
wizerd generate schema.sql -o diagram.svg -t light
wizerd generate schema.sql -o diagram.svg -t dracula
```
### Spacing Profiles
```bash
# Compact for small schemas
wizerd generate schema.sql -o diagram.svg -w compact
# Spacious for large schemas
wizerd generate schema.sql -o diagram.svg -w spacious
```
### Show Foreign Key Labels
```bash
wizerd generate schema.sql -o diagram.svg --show-edge-labels
```
### Color by Relationship Target
```bash
wizerd generate schema.sql -o diagram.svg --color-by-trunk
```
## Configuration
Create a config file:
```bash
wizerd init
```
This creates `.wizerd.yaml`:
```yaml
output: diagram.svg
theme: default-dark
show-edge-labels: false
spacing-profile: standard
color-by-trunk: false
```
See [Configuration](docs/configuration.md) for full details.
## Documentation
- [Getting Started](docs/getting-started.md) — Your first diagram
- [Configuration](docs/configuration.md) — Customization options
- [Themes](docs/themes.md) — All 14 themes with previews
- [Spacing Profiles](docs/spacing-profiles.md) — Layout controls
- [Examples](docs/examples.md) — Practical examples
- [CLI Reference](docs/cli-reference.md) — Complete command reference
## Example Schemas
WizERD includes example schemas:
| File | Tables | Description |
|------|--------|-------------|
| `dev/dumps/examples/simple_schema.sql` | 2 | Users and posts |
| `dev/dumps/examples/schema.sql` | 20+ | Music streaming platform |
| `dev/dumps/examples/large_schema.sql` | 50+ | Complex relationships |
## Project Goals
- Parse large PostgreSQL schemas from dump files
- Build constraint-aware graph layouts optimized for clarity
- Render high-quality SVG diagrams suitable for documentation
## License
MIT License — see [LICENSE](LICENSE) for details.
## Contributing
Contributions welcome! Please open an issue or PR at https://github.com/Pork0594/wizerd