Schema Viz
raw JSON → 0.3.3 verified Sat May 09 auth: no javascript
Universal database schema visualizer that takes a schema file or directory and generates an interactive ER diagram in the browser with pan, zoom, and live reload. Currently at version 0.3.3, released monthly-ish. Supports Prisma, Laravel migrations, TypeORM, Drizzle ORM, JSON, and live PostgreSQL/MySQL introspection. Key differentiator: auto-layout based on FK-graph BFS, Figma-style select/edit modes, drag-and-drop persistence via share files, and framework detection with logos in the toolbar. Works as a CLI tool (global install) and runs a local server. No SaaS required.
Common errors
error Error: Cannot find module 'schema-viz' ↓
cause Global install failed or not in PATH; using npx without installing usually works but may pull an older version.
fix
Run 'npm install -g schema-viz' or use 'npx schema-viz' with an explicit version (e.g., npx schema-viz@0.3.3).
error Error: No parser detected for path './migrations' ↓
cause The tool couldn't auto-detect a supported schema format in the given directory.
fix
Specify --parser flag with the correct parser ID (e.g., --parser=laravel for Laravel migrations). Ensure files have expected extensions (.prisma, .json, .entity.ts, etc.).
error Port 7337 is already in use ↓
cause Another instance of schema-viz or other process is using the default port.
fix
Use --port flag to choose a different port (e.g., --port=8080).
Warnings
gotcha Layout resets on every schema change before v0.3.2. Update to >=0.3.2 to preserve table positions across edits. ↓
fix Upgrade schema-viz to version 0.3.2 or later.
breaking Parser auto-detection may pick the wrong parser if multiple schema formats are present in the same directory. Use --parser flag to force a specific parser. ↓
fix Specify --parser=prisma|laravel|typeorm|drizzle|json explicitly.
deprecated The --auto-open flag is deprecated in favor of --autoopen (without hyphen). Both work currently, but --auto-open may be removed in a future release. ↓
fix Use --autoopen instead of --auto-open.
gotcha URL-based introspection requires a live database; if the URL is unreachable, the tool hangs silently until timeout. Use a valid connection string with proper credentials. ↓
fix Test connection with psql or mysql client before using --url.
Install
npm install schema-viz yarn add schema-viz pnpm add schema-viz Imports
- default wrong
const schemaViz = require('schema-viz')correctimport schemaViz from 'schema-viz' - run wrong
const run = require('schema-viz').runcorrectimport { run } from 'schema-viz' - type definitions
import type { Schema, Table } from 'schema-viz'
Quickstart
npx schema-viz ./prisma/schema.prisma --port=8080 --autoopen