Programming Language
A programming language that transpiles to idiomatic TypeScript/Rust/Python types, allowing effortless type-safe interop between languages.
Website • Docs • Language Tour • Playground • Discord
Genotype is built for teams working with multiple programming languages (e.g., TypeScript front-end with Rust back-end), building API clients, file formats and standards, gradual language migration, etc.
Genotype is a small language that you can learn in 15 minutes, but it is feature-rich and allows expressing the most complex data structures. It has generics, supports recursive data types, and allows target-specific fine-tuning via annotations.
It isn't opinionated and adapts to the ecosystem instead of creating one. Want to generate Zod schemas instead of plan types? No problem! Need a ready-to-ship package or want to generate code right into existing modules? Can do! Need support for legacy Python versions? Absolutely.
Unlike most machine-generated code, the code Genotype produces is clean, follows the idiomatic naming for types and files, and follows the common conventions.
And of course, Genotype is AI agent-ready and provides skill, llms.txt, and leaves code comment breadcrumbs to help steer LLMs into using it correctly.
Genotype indeed overlaps with Protocol Buffers, but it doesn't impose the transport or storage format. It focuses on producing clean idiomatic types with minimal to no runtime instead of optimizing data transfer performance. TypeScript has no runtime at all. Rust and Python use standard Serde and Pydantic to close the gaps.
As a result, it better fits when developing API clients and web app client-server interop. It's more flexible and allows more complex data types and data shapes Protobuf cannot express directly.
Install the Genotype CLI on macOS or Linux by running the following command in your terminal:
curl -fsSL https://genotype-lang.org/install.sh | shInstall the Genotype CLI on Windows by running the following command in PowerShell:
irm https://genotype-lang.org/install.ps1 | iexSee Installation Reference for more options, such as Cargo Binstall, building from source, etc.
Try it out:
mkdir hello-world && cd hello-world
gt init
gt buildThis will create a build a new project with a language guide demonstrating the Genotype syntax and features.
See the Getting Started guide for more details.