Skip to content

Repository files navigation

SchemaForge VS Code Extension

CILicense: MIT

Bidirectional schema converter extension for VS Code — convert between SQL DDL, Prisma, Django, TypeORM, SQLAlchemy, Alembic, JSON Schema, GraphQL, EF Core, and Scala case classes.

Features

  • Live Preview — side panel showing your active schema file converted to all 11 formats
  • Quick ConvertCtrl+Alt+S to convert the active editor's schema to your target format
  • Format DetectionCtrl+Alt+D to detect schema format
  • Schema Diff — diff two schema files in VS Code's native diff editor
  • Right-Click — convert or detect from the file explorer context menu
  • Custom Editor — rich conversion preview for .schemaforge files

Prerequisites

Requires SchemaForge CLI installed:

pip install git+https://github.com/Coding-Dev-Tools/schemaforge.git

The CLI must be available on your PATH.

Extension Settings

SettingDefaultDescription
schemaforge.cliPathschemaforgePath to the schemaforge CLI executable
schemaforge.defaultTargetFormatsqlDefault conversion target (sql, prisma, drizzle, typeorm, django, sqlalchemy, alembic, json_schema, graphql, ef, scala)
schemaforge.livePreview.enabledtrueEnable live preview when editing schema files

Commands

CommandKeybindingDescription
SchemaForge: Convert Schema File...Select a schema file and target format to convert
SchemaForge: Quick Convert (Active Editor)Ctrl+Alt+S (Cmd+Alt+S on Mac)Convert the active editor content to default target format
SchemaForge: Diff Two Schema FilesSelect two files and view differences
SchemaForge: Detect FormatCtrl+Alt+D (Cmd+Alt+D on Mac)Detect the format of the active editor's content

Development

# Clone
git clone https://github.com/Coding-Dev-Tools/vscode-schemaforge.git
cd vscode-schemaforge
# Install dependencies
npm install
# Compile
npm run compile
# Lint
npm run lint
# Launch Extension Development Host# Press F5 in VS Code

Project Structure

src/
├── cli.ts # SchemaForge CLI wrapper
├── commands/
│ ├── convert.ts # Convert command handler
│ ├── detect.ts # Format detection handler
│ └── diff.ts # Schema diff handler
├── output.ts # Shared cached OutputChannel helper
├── panels/
│ └── previewPanel.ts # Live preview WebView panel
├── providers/
│ └── schemaEditorProvider.ts # Custom editor provider
├── runCommand.ts # Command wrapper: surface errors + forward URIs
└── extension.ts # Extension entry point + activation

License

MIT — see LICENSE for details.

Security

See SECURITY.md for our security policy.

Changelog

See CHANGELOG.md for version history.

Releases

Packages

Contributors

Languages