@erdflow/prisma
v0.1.0
Published
Interactive ERD from a Prisma schema — local-first, opens in your browser
Maintainers
Readme
@erdflow/prisma
Interactive ERD from a Prisma schema — local-first, opens in your browser.
Part of the erdFlow family. Other domains (Laravel, …) ship as separate packages later.
npx @erdflow/prismaPreview


What it does
- Detects your Prisma schema (
prisma/schema.prisma, multi-file folder, orprisma.config.ts) - Parses models, relations, enums, and indexes
- Starts a local server at
http://127.0.0.1:4317 - Opens an interactive entity-relationship diagram
Example output:
✓ Detected Prisma
✓ prisma/schema.prisma
✓ 12 entities · 2 enums · 11 relations · 3 indexes
→ http://127.0.0.1:4317/
Watching schema files for changes...Quick start
From the project (or monorepo package) that owns the Prisma schema:
npx @erdflow/prismaOr install globally:
npm install -g @erdflow/prisma
erdflow-prismaExplicit path
npx @erdflow/prisma --prisma ./prisma/schema.prisma
npx @erdflow/prisma --prisma ./prisma/schema
npx @erdflow/prisma --prisma ./backend/prisma/schema.prismaSupports Prisma v6 and v7 (url-less datasource, multi-file, prisma.config.ts).
Providers: PostgreSQL, MySQL, SQLite, MongoDB (Document View instead of SQL View), and other Prisma SQL providers.
Options
| Flag | Description |
| --- | --- |
| --prisma <path> | Schema file or multi-file folder |
| --port <number> | Server port (default 4317) |
| --no-open | Do not open the browser |
| --no-watch | Disable live re-parse |
npx @erdflow/prisma --prisma ./prisma/schema.prisma --port 5000
npx @erdflow/prisma --prisma ./prisma/schema.prisma --no-openLive updates
With watch enabled (default), editing .prisma files re-parses and updates the browser over WebSocket.
For AI agents
This package ships Prisma-focused docs agents can read after install:
| File | Purpose |
| --- | --- |
| AGENTS.md | How to run against Prisma (v6/v7, multi-file, monorepos) |
| llms.txt | Short command index |
Requirements
- Node.js ≥ 20
Links
License
MIT © erdFlow
