erdify-rs
CLI tool to generate Mermaid ER (Entity-Relationship) diagrams from PostgreSQL databases.
Install
Download a prebuilt binary from the releases page (Windows x86_64, macOS arm64, Linux x86_64), or build from source:
Usage
If --url is omitted, erdify falls back to the DATABASE_URL environment variable. Output goes to stdout unless --output is set.
Options
| Flag | Description |
|---|---|
-u, --url |
PostgreSQL connection URL (or set DATABASE_URL) |
--schema |
Only include these schemas (comma-separated) |
--table |
Only include these tables (comma-separated) |
--ignore-tables |
Exclude these tables (comma-separated), mutually exclusive with --table |
--minimal |
Columns only, no PK/FK |
--full |
Columns + PK/FK/NOT NULL + relations + constraints + indexes |
-o, --output |
Write to file instead of stdout |
--title |
Diagram title (default: database name) |
Examples
# Only the public schema, full detail
# Everything except audit tables
# Write to a file