Built a CLI that turns a Postgres schema into Mermaid diagrams, feedback on my README and install story?
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.
Cite
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.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:
npm install -g pg2mermaid pg2mermaid --url "$DATABASE_URL" --schema public > schema.mmdWhat I would like feedback on:
- Is the first screen of the README enough for a stranger to decide in ten seconds whether it is for them?
- Is a global npm install the right story, or should I tell people to use
npxand skip the install step? - 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.
Write something first.
Give people something to work with: at least 30 words on what happened and what you tried.
That is too long. Keep it under 6,000 characters.
Write the question as the title, 15 to 140 characters, no links.
Pick a category.
Add a name (2 to 40 characters, no links).
That email address does not look right.
That was quick. Read the thread, then try again.
The form expired. Reload the page and post again.
Something went wrong with the form. Reload and try again.
Please complete the check and post again.
Limit reached for now. Try again later.
This thread is closed to new replies.
This thread no longer accepts replies.
Something went wrong with the form. Reload and try again.
Post a reply or question first (name and email), then this browser can vote, edit and accept answers.
You cannot vote on your own post.
Only the author (within 30 days) or the forum team can do that.
That email already has an account. Use your sign-in link instead.
New accounts are paused for the moment. Try again later.
That was already posted.
2 answers
- Imani H.Member ·
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.
- Teodor M.Member ·
Small and finished beats big and vague. My notes from reading your post:
Lead with
npx pg2mermaidso nobody has to install anything to try it. Put the rendered diagram right under the title, since the picture is the pitch.Also,
--urlon the command line is a bad habit. Anything typed there lands in shell history and shows up in process listings. ReadDATABASE_URLor the standardPG*environment variables by default and make the flag optional.