Registry / devops / quick-erd

quick-erd

JSON →
library4.34.1jsnpmunverified

Quick-ERD is a text-based ERD editor and code generator for database migrations, queries, TypeScript types, and ORM entities. Current stable version is 4.34.1, released regularly on npm. It supports offline usage via a local web UI and CLI, and can reverse-engineer ERD files from PostgreSQL, MySQL, MSSQL, and SQLite. Unlike other ERD tools, it offers drag-and-drop visualization, auto-formatting, and generates type-safe proxy schemas for better-sqlite3-proxy. It requires peer dependencies dotenv, express, knex, and listening-on for some CLI commands.

npm install quick-erd
INSTALL
IMPORT
SIG · QUICK-ERD
Q
quick-erd
devopsjavascriptv4.34.1
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.

quick-erd
✓ Not importable as module; use CLI via npx
✗ import quickErd from 'quick-erd'
quick-erd is a CLI tool, not a library. Use npx commands like 'npx erd-ui' or 'npx erd-to-types'.
erd-ui
✓ npx erd-ui --open
✗ import { erdUi } from 'quick-erd'
Launch the web UI locally via npx command, not an import.
erd-to-types
✓ npx erd-to-types < erd.txt > types.ts
Generates TypeScript types of each table; pipe input from erd.txt.

Install quick-erd, create a sample ERD file, generate TypeScript types and SQLite migration schema using npx commands.

npm install -D quick-erd echo "CREATE TABLE users ( id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT NOT NULL, email TEXT UNIQUE );" > erd.txt npx erd-to-types < erd.txt > types.ts npx erd-to-sqlite < erd.txt > init.sql
Debug
Known issues
breakingPeer dependencies must be installed manually for some commands (e.g., dotenv, express, knex, listening-on). Not auto-installed with npm install.
fix
Install peer deps: npm install -D dotenv express knex listening-on
affects: >=4.0.0
gotchaThe package is not importable as a module; it only provides CLI commands via npx. Attempting to require or import will fail.
fix
Use npx commands directly (e.g., npx erd-ui, npx erd-to-types).
affects: *
gotchaWindows PowerShell may require escaping '<' with backtick or using Get-Content piping. Git Bash recommended.
fix
Use Git Bash or PowerShell's Get-Content: Get-Content erd.txt | npx erd-to-types > types.ts
affects: *
deprecatedThe hosted web UI URLs may change; check GitHub README for latest hosted links.
fix
Refer to https://github.com/beenotung/quick-erd for current hosted URLs.
affects: *
Errors
Common errors & fixes
npx: command not found: erd-ui
quick-erd not installed or global path issue.
fix
Run 'npm install -D quick-erd' first, then use npx from project root.
Error: Cannot find module 'dotenv'
Missing peer dependency dotenv.
fix
Install dotenv: 'npm install -D dotenv'
SyntaxError: Unexpected identifier at pipe input
Windows PowerShell misinterprets '<' as redirection.
fix
Use Git Bash or use Get-Content piping: 'Get-Content erd.txt | npx erd-to-types > types.ts'
Upgrade
Version history
4.34.1latest on npm
Audit
Dependencies
dotenvrequiredDatabase connection credentials from .env
expressrequiredLocal web UI server
knexrequiredDatabase queries and migrations generation
listening-onoptionalExpress server listening utility
Agent activity
4 hits · last 30 days
node
4
Resources
quick-erd — npm install quick-erd · libregistry