ERManagerERManager is a VS Code / Cursor extension for designing and editing database ER diagrams directly inside your editor. Open
FeaturesVisual ER Diagram Editor
Table & Column Management
Relationships
Categories
View Modes
Code Export
Generate ready-to-use code from your diagram:
FK constraints can be toggled on/off for SQL output. SQL ImportImport existing Legacy
|
| File | Purpose | Commit to Git? |
|---|---|---|
*.erm.json |
Schema — tables, columns, relations, categories | ✅ Yes |
*.erm.layout.json |
Diagram layout — positions and sizes | Team decision |
*.erm |
Legacy ERMaster XML (read-only in ERManager) | ✅ Yes |
Getting Started
- Install ERManager from the VS Code Marketplace.
- New diagram — Create a new file named
yourschema.erm.json. ERManager opens it automatically as a blank diagram editor. - Right-click on the canvas to add a table.
- Drag from a table handle to another table to create a relationship.
Migrating from ERMaster? Open your
.ermfile, click the save button to generate.erm.json, then open it for full editing. See Viewer Mode for details.
Usage
Editor Mode (*.erm.json)
Full editing capabilities are available.
- Add table — right-click on canvas → Add Table
- Edit table — click a table to open the edit panel on the right
- Delete table — right-click a table → Delete Table
- Add relation — drag from the edge handle of one table to another
- Edit relation — right-click an edge to change cardinality or delete
- Import SQL — toolbar Import SQL button, select a
.sqlor.ddlfile - Export code — toolbar dropdown: select PostgreSQL / MySQL / SQLite / TypeScript / JSON
Viewer Mode (*.erm)
Read-only visualization of legacy ERMaster files.
- Export to JSON — toolbar save button converts to
.erm.json+.erm.layout.json
Workflow: migrating from ERMaster
- Open your
.ermfile — ERManager displays it as a read-only diagram- Click the save button in the toolbar to export
- Two files are generated:
yourfile.erm.json(schema) andyourfile.erm.layout.json(layout)- Open
yourfile.erm.json— full editing is now available
Development
# Install dependencies
pnpm install
# Build (extension + webview)
pnpm compile
# Watch mode
pnpm watch
# Lint
pnpm lint
# Package .vsix
pnpm package
Press F5 in VS Code to launch the Extension Development Host.
The test-fixtures/ folder opens automatically — use sample.erm.json to test the editor.
Tech Stack
| Layer | Technology |
|---|---|
| Extension host | TypeScript + VS Code Extension API |
| Webview UI | React 18 + React Flow (@xyflow/react v12) |
| Code editor | Monaco Editor |
| Build | esbuild |
Support
If you find ERManager useful, consider buying me a coffee!
License
MIT


