# Built a CLI that turns a Postgres schema into Mermaid diagrams, feedback on my README and install story?

Source: https://gitshowcase.com/forum/discuss/built-a-cli-that-turns-a-postgres-schema-into-mermaid-diagrams/
Site: GitShowcase Forum, category Show Your Project for Feedback
Published: 2026-11-26. Updated: 2026-11-26. Replies: 2.

## Question by Kwesi A., 2026-11-26

I have been freelancing for a few months and wanted a small project that does one useful thing well. I built `pg2mermaid`, a Node CLI that connects to a Postgres database, reads tables, columns, primary keys and foreign keys from `information_schema`, and prints a Mermaid `erDiagram` block you can paste into a README or a docs page.

Repo: github.com/kwesi-builds/pg2mermaid

Right now the README opens with a one line description, then a screenshot of the rendered diagram, then install and usage:

```bash
npm install -g pg2mermaid
pg2mermaid --url "$DATABASE_URL" --schema public > schema.mmd
```

What I would like feedback on:

1. Is the first screen of the README enough for a stranger to decide in ten seconds whether it is for them?
2. Is a global npm install the right story, or should I tell people to use `npx` and skip the install step?
3. I only handle foreign keys and not views or enums yet. Should I say that up front or let people discover it?

I am a junior and a bit worried it is too small to be worth showing. Be blunt, I would rather fix it now.

## Reply 1 by Teodor M., 2026-11-26

Small and finished beats big and vague. My notes from reading your post:

Lead with `npx pg2mermaid` so nobody has to install anything to try it. Put the rendered diagram right under the title, since the picture is the pitch.

Also, `--url` on the command line is a bad habit. Anything typed there lands in shell history and shows up in process listings. Read `DATABASE_URL` or the standard `PG*` environment variables by default and make the flag optional.

## Reply 2 by Imani H., 2026-11-26

As someone currently reading a lot of READMEs while job hunting: I would put a "Limitations" section right after usage. Saying "no views, no enums yet" tells me you know your own tool. Hiding it makes me wonder what else is missing.

Also add one real example output as text, not only a screenshot, so I can see the Mermaid it produces without leaving the page.

---
Cite as: GitShowcase Forum, "Built a CLI that turns a Postgres schema into Mermaid diagrams, feedback on my README and install story?", https://gitshowcase.com/forum/discuss/built-a-cli-that-turns-a-postgres-schema-into-mermaid-diagrams/, accessed 2026-11-26.
