PostgERD is a CLI tool that connects to a PostgreSQL database using environment variables and generates Entity-Relationship Diagram (ERD) SVG images, or outputs PlantUML and nomnoml files. Version 1.0.7 is latest as of writing, with no regular release cadence. It supports multiple database schemas and relies on dotenv for loading credentials. Differentiators: generates diagrams directly from live PostgreSQL schemas without manual modeling; outputs three formats (SVG, PlantUML, nomnoml). Note that foreign key connections across schemas are only supported in PlantUML output.
npm install postgerdNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Connects to PostgreSQL using environment variables and generates an ERD SVG, or alternate formats, with optional schema restriction.
Use --plantuml option if you need cross-schema foreign key relationships.
Ensure required environment variables are set or create a .env file with DATABASE_URL.
Run command from the directory containing .env or specify path via dotenv options (not supported by postgerd).
No fix needed; it works in both contexts.
Install postgres client: npm install pg
Check connection string or environment variables: echo $DATABASE_URL
List available schemas: `npx postgerd` without --schema, or use correct schema name.