Registry / database / schema-viz

schema-viz

JSON →
library0.3.3jsnpmunverified

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.

npm install schema-viz
INSTALL
IMPORT
SIG · SCHEMA-VIZ
S
schema-viz
databasejavascriptv0.3.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import schemaViz from 'schema-viz'
const schemaViz = require('schema-viz')
ESM-only since v0.3.0; CLI usage is via npx or global install, not programmatic imports.
run
import { run } from 'schema-viz'
const run = require('schema-viz').run
Programmatic API is experimental; run() starts the server. Use CLI for normal usage.
type definitions
import type { Schema, Table } from 'schema-viz'
TypeScript types are exported for use in plugins or custom parsers.

Launches an interactive ER diagram for a Prisma schema file, auto-opens browser.

npx schema-viz ./prisma/schema.prisma --port=8080 --autoopen
schema-viz --version
Debug
Known issues
gotchaLayout 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.
affects: <0.3.2
breakingParser 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.
affects: >=0.2.0
deprecatedThe --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.
affects: >=0.2.0
gotchaURL-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.
affects: >=0.2.0
Errors
Common errors & fixes
Error: Cannot find module 'schema-viz'
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: No parser detected for path './migrations'
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.).
Port 7337 is already in use
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).
Upgrade
Version history
0.3.3latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
11 hits · last 30 days
node
8
OpenAI (training)
1
Resources
schema-viz — npm install schema-viz · libregistry