Skip to content

Commit 718ad99

Browse files
feat: VS Code extension with live preview, diff, and quick convert (v1.7.0)
- New companion repo: vscode-schemaforge/ — VS Code extension - Commands: convert, quickConvert (Ctrl+Alt+S), diff, detect (Ctrl+Alt+D) - Live Preview WebView panel showing all format conversions - Custom editor for .schemaforge files - Schema diff using VS Code native diff editor - Right-click context menu for schema files - pyproject.toml: bumped to v1.7.0, updated description (11 formats) - README: updated format tables, VS Code extension section, roadmap - Architecture diagram updated to include all 11 formats
1 parent 5a4b2f3 commit 718ad99

2 files changed

Lines changed: 74 additions & 22 deletions

File tree

README.md

Lines changed: 72 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# SchemaForge
22

3-
> **Bidirectional ORM schema converter** — convert between SQL DDL, Prisma, Drizzle, TypeORM, Django, SQLAlchemy, Alembic migrations, JSON Schema, and GraphQL SDL. **9 formats, 72 direction pairs.**
3+
> **Bidirectional ORM schema converter** — convert between SQL DDL, Prisma, Drizzle, TypeORM, Django, SQLAlchemy, Alembic migrations, JSON Schema, GraphQL SDL, EF Core (C#), and Scala case classes. **11 formats, 110 direction pairs.**
44
55
[![PyPI](https://img.shields.io/pypi/v/schemaforge)](https://pypi.org/project/schemaforge/)
66
[![Python](https://img.shields.io/pypi/pyversions/schemaforge)](https://pypi.org/project/schemaforge/)
77
[![License](https://img.shields.io/pypi/l/schemaforge)](https://github.com/Coding-Dev-Tools/schemaforge/blob/main/LICENSE)
88
[![CI](https://github.com/Coding-Dev-Tools/schemaforge/actions/workflows/test.yml/badge.svg)](https://github.com/Coding-Dev-Tools/schemaforge/actions/workflows/test.yml)
9-
[![Tests](https://img.shields.io/badge/tests-233%20passing-brightgreen)](https://github.com/Coding-Dev-Tools/schemaforge)
9+
[![Tests](https://img.shields.io/badge/tests-270%20passing-brightgreen)](https://github.com/Coding-Dev-Tools/schemaforge)
1010

1111
**Why SchemaForge?** Every major ORM migration is a one-way street. Prisma introspects SQL but can't export back. Drizzle users manually rewrite schemas when switching ORMs. TypeORM developers are locked into decorator syntax. SchemaForge is the first tool to do **bidirectional, lossless conversion** between 9 schema formats — with a shared internal representation that guarantees roundtrip fidelity.
1212

13-
Convert any schema to any format, verify equivalence with the diff command, generate Alembic migrations, produce JSON Schema definitions, create GraphQL SDL types, and batch-process entire directories. Whether you're migrating from Prisma to Drizzle, sharing a schema with a Django backend, or exposing your data model as GraphQL — SchemaForge handles it.
13+
Convert any schema to any format, verify equivalence with the diff command, generate Alembic migrations, produce JSON Schema definitions, create GraphQL SDL types, convert Entity Framework (C#) entities, generate Scala case classes, and batch-process entire directories. Whether you're migrating from Prisma to Drizzle, sharing a schema with a Django backend, exposing your data model as GraphQL, translating C# entities to Scala, or working with the SchemaForge VS Code extension for live preview — SchemaForge handles it.
1414

1515
## Quick Start
1616

@@ -111,6 +111,8 @@ Detects added, removed, and modified tables, columns, indexes, and constraints.
111111
| Alembic migrations ||||
112112
| JSON Schema ||||
113113
| GraphQL SDL ||||
114+
| EF Core (C#) ||||
115+
| Scala case class ||||
114116

115117
**Alembic** is generator-only: you can create migration scripts from any format, but parsing existing migrations back to IR is not yet supported.
116118

@@ -127,6 +129,8 @@ Detects added, removed, and modified tables, columns, indexes, and constraints.
127129
| `alembic` | Alembic migration scripts |
128130
| `json_schema` | JSON Schema (draft 2020-12) |
129131
| `graphql` | GraphQL SDL |
132+
| `ef` | Entity Framework Core (C#) |
133+
| `scala` | Scala case classes (Doobie/Quill/Slick) |
130134

131135
## How It Works
132136

@@ -137,15 +141,17 @@ SchemaForge uses a **shared Internal Representation (IR)** — all formats conve
137141
- **Extensibility**: adding a new format requires only a parser and a generator — no pairwise converters
138142

139143
```
140-
SQL DDL ───┐
141-
Prisma ────┤
142-
Drizzle ───┤
143-
TypeORM ───┼──▶ Shared IR ──▶ Any Format
144-
Django ────┤
145-
SQLAlchemy ───┤
146-
Alembic ────┤
147-
JSON Schema ──┤
148-
GraphQL ────┘
144+
| SQL DDL ───┐
145+
| Prisma ────┤
146+
| Drizzle ───┤
147+
| TypeORM ───┤
148+
| Django ────┤
149+
| SQLAlchemy ───┤
150+
| Alembic ────┤
151+
| JSON Schema ──┤
152+
| GraphQL ────┤
153+
| EF Core ─────┤
154+
| Scala ─────┤
149155
```
150156

151157
Each parser reads format-specific syntax and builds a schema IR. Each generator takes the same IR and produces format-native output. The `fn:` prefix convention preserves SQL function defaults (CURRENT_TIMESTAMP, NOW(), gen_random_uuid()) across format boundaries.
@@ -233,15 +239,18 @@ Each fixture demonstrates the same blog schema so you can compare ORM syntax sid
233239

234240
## Features
235241

236-
- **Bidirectional conversion** — all 9 formats convert to and from every other format (72 direction pairs)
242+
- **Bidirectional conversion** — all 11 formats convert to and from every other format
237243
- **Zero-loss roundtripping** — `sql → prisma → sql` reproduces the original schema exactly
238244
- **Custom type mappings** — YAML/JSON config files to override any type mapping with template variables
245+
- **VS Code extension** — live preview, schema diff, and one-click conversion from VS Code
239246
- **Alembic migration generation** — create database migration scripts from any schema format
240247
- **JSON Schema** — import/export schema definitions as JSON Schema (draft 2020-12)
241248
- **GraphQL SDL** — generate or consume GraphQL type definitions with enums, directives, and scalars
249+
- **EF Core (C#) support** — import/export Entity Framework entity classes with data annotations
250+
- **Scala case class support** — generate case classes targeting Doobie/Quill/Slick
242251
- **Diff mode** — compare two schemas in the same format with line-level differences
243252
- **Batch mode** — convert entire directories of schema files with one command
244-
- **Intelligent type mapping** — types map correctly across all 9 formats
253+
- **Intelligent type mapping** — types map correctly across all 11 formats
245254
- **Function default preservation** — `CURRENT_TIMESTAMP`, `NOW()`, `gen_random_uuid()` survive roundtrips
246255
- **MySQL support** — ENGINE=InnoDB, AUTO_INCREMENT, DEFAULT CHARSET, COMMENT table options
247256
- **Inline ENUM** — `ENUM('small', 'medium', 'large')` column types parsed and roundtripped
@@ -267,7 +276,7 @@ schemaforge mcp --sse --port 8000
267276

268277
| Tool | Description |
269278
|------|-------------|
270-
| `convert` | Convert a schema between any two of the 9 formats |
279+
| `convert` | Convert a schema between any two of the 11 formats |
271280
| `diff` | Compare two schemas and show differences |
272281
| `check` | Verify schema consistency across a directory |
273282
| `formats` | List all supported formats with descriptions |
@@ -299,6 +308,45 @@ schemaforge mcp --sse --port 8000
299308
}
300309
```
301310

311+
## VS Code Extension
312+
313+
The **SchemaForge VS Code extension** provides live schema preview, quick conversion, and schema diffing directly from your editor.
314+
315+
### Features
316+
317+
- **Live Preview** — opens a side panel showing your active schema file converted to all other formats (tabbed interface for quick comparison)
318+
- **Quick Convert** — `Ctrl+Alt+S` / `Cmd+Alt+S` to convert the active editor's schema to your configured default target format
319+
- **Format Detection** — `Ctrl+Alt+D` / `Cmd+Alt+D` to detect and display the format of the active schema file
320+
- **Diff Two Schemas** — select two schema files to diff them side-by-side in VS Code's native diff editor
321+
- **Right-Click Conversion** — right-click any schema file in the explorer to convert it
322+
- **Custom Editor** — open `.schemaforge` files for a rich conversion preview
323+
- **Auto-Refresh** — preview panel updates when you save a schema file or switch tabs
324+
325+
### Installation
326+
327+
1. Install SchemaForge: `pip install schemaforge`
328+
2. Install the extension from the [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=revenue-holdings.vscode-schemaforge)
329+
3. Open a `.sql`, `.prisma`, `.graphql`, `.cs`, or `.scala` file
330+
4. Run `SchemaForge: Show Preview` from the command palette
331+
332+
### Configuration
333+
334+
| Setting | Default | Description |
335+
|---------|---------|-------------|
336+
| `schemaforge.cliPath` | `schemaforge` | Path to the schemaforge CLI executable |
337+
| `schemaforge.defaultTargetFormat` | `prisma` | Default target format for quick conversions |
338+
| `schemaforge.livePreview.enabled` | `true` | Enable live preview panel when editing schema files |
339+
340+
### Development
341+
342+
```bash
343+
git clone https://github.com/Coding-Dev-Tools/vscode-schemaforge.git
344+
cd vscode-schemaforge
345+
npm install
346+
npm run compile
347+
# Press F5 in VS Code to launch extension host
348+
```
349+
302350
## Roadmap
303351

304352
| Version | Features |
@@ -317,13 +365,17 @@ schemaforge mcp --sse --port 8000
317365
| v1.2.0 | JSON Schema support (8th format) |
318366
| **v1.3.0** | **GraphQL SDL support (9th format)** |
319367
| v1.4.0 | Schema consistency check, CI/CD workflow, MCP server |
368+
| **v1.5.0** | **Entity Framework Core (C#) support (10th format)** |
369+
| **v1.6.0** | **Scala case class support (11th format)** |
370+
| **v1.7.0** | **VS Code extension — live preview, diff, quick convert** |
320371

321372
### Planned
322373

323-
- [ ] VS Code extension with live diff
324-
- [ ] MCP server for AI-assisted schema operations
325-
- [ ] CI/CD check: enforce schema consistency across branches
326-
- [ ] Additional formats: Doobie/Quill (Scala), Entity Framework (C#)
374+
- [ ] VS Code extension: in-editor syntax highlighting for all 11 schema formats
375+
- [ ] Live schema watch mode for automatic re-conversion on file change
376+
- [ ] Mermaid/ERD diagram generation from schema IR
377+
- [ ] Terraform/OpenTofu provider for schema drift detection
378+
- [ ] Web dashboard with schema diff history
327379

328380
## Pricing
329381

@@ -391,4 +443,4 @@ MIT — see [LICENSE](LICENSE)
391443

392444
---
393445

394-
<sub>Part of [Revenue Holdings](https://coding-dev-tools.github.io/revenueholdings.dev/) — a suite of 10 developer CLI tools built by autonomous AI agents. Also check out [API Contract Guardian](https://github.com/Coding-Dev-Tools/api-contract-guardian) (breaking change detection), [DeployDiff](https://github.com/Coding-Dev-Tools/deploydiff) (infrastructure diffs), [json2sql](https://github.com/Coding-Dev-Tools/json2sql) (JSON → SQL), [ConfigDrift](https://github.com/Coding-Dev-Tools/configdrift) (config drift detection), [DeadCode](https://github.com/Coding-Dev-Tools/deadcode) (dead code cleanup), [APIAuth](https://github.com/Coding-Dev-Tools/apiauth) (API key management), [APIGhost](https://github.com/Coding-Dev-Tools/apighost) (mock API server), [Envault](https://github.com/Coding-Dev-Tools/envault) (env sync), and [click-to-mcp](https://github.com/Coding-Dev-Tools/click-to-mcp) (CLI → MCP server).</sub>
446+
<sub>Part of [Revenue Holdings](https://coding-dev-tools.github.io/revenueholdings.dev/) — a suite of 10 developer CLI tools built by autonomous AI agents. Also check out the [SchemaForge VS Code extension](https://github.com/Coding-Dev-Tools/vscode-schemaforge), [API Contract Guardian](https://github.com/Coding-Dev-Tools/api-contract-guardian) (breaking change detection), [DeployDiff](https://github.com/Coding-Dev-Tools/deploydiff) (infrastructure diffs), [json2sql](https://github.com/Coding-Dev-Tools/json2sql) (JSON → SQL), [ConfigDrift](https://github.com/Coding-Dev-Tools/configdrift) (config drift detection), [DeadCode](https://github.com/Coding-Dev-Tools/deadcode) (dead code cleanup), [APIAuth](https://github.com/Coding-Dev-Tools/apiauth) (API key management), [APIGhost](https://github.com/Coding-Dev-Tools/apighost) (mock API server), [Envault](https://github.com/Coding-Dev-Tools/envault) (env sync), and [click-to-mcp](https://github.com/Coding-Dev-Tools/click-to-mcp) (CLI → MCP server).</sub>

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "schemaforge"
7-
version = "1.4.0"
8-
description = "Bidirectional ORM schema converter — convert between SQL DDL, Prisma, Drizzle, TypeORM, Django, SQLAlchemy, Alembic, JSON Schema, and GraphQL SDL with zero-loss roundtripping"
7+
version = "1.7.0"
8+
description = "Bidirectional ORM schema converter — convert between SQL DDL, Prisma, Drizzle, TypeORM, Django, SQLAlchemy, Alembic, JSON Schema, GraphQL SDL, EF Core (C#), and Scala case classes with zero-loss roundtripping"
99
readme = "README.md"
1010
requires-python = ">=3.10"
1111
license = "MIT"

0 commit comments

Comments
 (0)