Type-safe diagrams and source code from one schema.
Define your domain once. Generate types for TypeScript, Python, Rust, Go, C#, F#, Dart, PHP, and Protobuf — and a direct-manipulation visual type canvas — from the same source.
One .td file in. Three outputs out.
typeDiagram is a tiny, language-neutral DSL for describing your data model — records, tagged unions, generics, aliases.
Source code, 9 languages
TypeScript, Python, Rust, Go, C#, F#, Dart, PHP, and Protobuf — DTOs, data classes, discriminated unions, pattern-matchable enums — generated from the same definition, always in sync.
Visual type editor
Drag types, edit fields in place, draw relationships, pan, zoom, and auto-layout. Every change remains
a clean, versionable .td schema.
Round-trip conversion
Convert existing TypeScript, Python, Rust, Go, C#, F#, Dart, PHP, or Protobuf types back to the DSL. Retrofit an existing codebase without rewriting it.
A canvas backed by a real schema
The beautiful canvas and the source model are one document. Visual edits produce typed source, ready to generate code in every supported language.
One definition, N outputs
Python backend, Dart/Kotlin mobile app, TypeScript web client, Rust data pipeline, gRPC services — keeping DTOs aligned across nine languages is a full-time job. Change a field, regenerate, done.
A visual type canvas in your editor.
Drag nodes, edit fields, draw relationships, and navigate the infinite canvas beside syntax-highlighted source. Every edit stays synchronized. Available free on the Visual Studio Marketplace.
Install the .vsix manually
- Download
typediagram.vsixabove. - Open VS Code and press
Ctrl+Shift+P(Cmd+Shift+Pon macOS). - Run Extensions: Install from VSIX… and select the downloaded file.
- Or from the terminal:
code --install-extension typediagram.vsix
Complex type systems, shaped visually.
Sketch relationships as freely as a whiteboard while typeDiagram keeps the architecture versionable, generated, and strictly typed.