D2 ERD from Postgres
D2 Diagrams are awesome. If you have a postgres database that already exists that you'd like to diagram, you can use this tool to generate an ERD.
- Clone this repo
$ DATABASE_URL=postgres://postgres:postgres@localhost:5432/yourdb go run . > output.d2
$ d2 output.d2 out.svgYou will see that there are 2 gitignored files generated, out.svg and output.d2.
Happy hacking!