# typewriter

A Rust proc-macro SDK, released as the typebridge CLI, that generates matching TypeScript, Python Pydantic, Go, Swift, Kotlin, GraphQL, JSON Schema, Ruby, PHP and Dart types from annotated Rust structs and enums.

typewriter makes Rust structs and enums the single source of truth for type definitions used across a full-stack project, instead of an intermediary schema format such as OpenAPI or Protobuf that has to be kept in sync by hand. Annotating a type with a TypeWriter derive and a sync_to attribute regenerates matching type definitions in every listed target language whenever the Rust type changes, with full Serde compatibility, generic support and cross-file imports.

The released CLI is invoked as typebridge; end users install it from a shell script or PowerShell installer without needing Rust installed, or via Cargo if they do. It is added to a project as a Rust dependency alongside serde, then used with typebridge generate, typebridge check --ci for continuous integration, and typebridge watch for regenerating on file changes.

The typewriter binary and a cargo typewriter plugin command remain available as compatibility aliases for the typebridge name.

Website: https://aarambh-darshan.github.io/typewriter/
