
Genotype
A small type definition language that compiles to idiomatic TypeScript, Rust and Python
Gallery
About Genotype
Genotype is a small programming language for describing data types once and compiling them into idiomatic TypeScript, Rust and Python. You write your types in .type files, run one command, and each target gets native code that follows its own conventions, an ES module for TypeScript, a crate for Rust and a package for Python. The problem it addresses is the drift that happens when the same data shape lives in three codebases. Someone renames a field in the API, the client keeps the old name, and the bug surfaces a week later in production with a stack trace in a language the person who made the change doesn't read.
A Genotype file reads like a struct definition. A User type with name and email fields, a FullName type with a required first and an optional last marked with a question mark, and the User's name field typed as FullName so the two compose. The language is deliberately small, something the site says you can learn in about 15 minutes, but it's feature-rich enough for real schemas. It supports generics, recursive data types and target-specific annotations for tuning the output where one language needs something the others don't. It doesn't impose a transport or storage format, so it stays out of the way of whatever serialisation you already use.
The toolchain is a single command called gt. Running gt init bootstraps a project with a few prompts and generates the starting files, and gt build compiles the types for every enabled target, so after editing a type you run it again and the generated code catches up. Configuration lives in genotype.toml, with a name and version at the top and a section per language. The TypeScript section defines the manifest for the generated module, the Python section names the package manager, uv in the getting started example, and the Rust section sets the crate name and the edition. Each target has an enabled flag, which means a project can emit one language today and switch on another later without touching the type files. Install is one curl command on macOS and Linux or one PowerShell command on Windows.
It's for teams whose backend, client and data tooling live in different languages, API authors who ship client libraries in more than one ecosystem, people defining a file format that several programs have to read the same way, and anyone doing a gradual migration between languages who wants the data model to stay in sync while the code moves across. It also suits solo developers who keep a Rust service and a TypeScript frontend and are tired of updating both by hand. A typical setup might keep the shared models in one directory, run gt build as part of the normal build, and consume the TypeScript package from the web app, the crate from the service and the Python package from the data jobs, so a field added in one .type file shows up everywhere at once.
What makes it different is that it compiles to idiomatic native code rather than a runtime schema or a lowest common denominator. A Rust developer gets a normal Rust type they'd have written themselves, a Python developer gets a normal Python package, and neither has to learn the other's tooling or add a runtime dependency to read the schema. The target-specific annotations mean you can respect each language's idioms without forking the source of truth, which is the trap most cross-language schema tools fall into. That also matters for code review. A generated Rust type that looks like the one a colleague would write is one a colleague will actually read, where a blob of generic serialisation code gets waved through.
The playground on the site is the quickest way to see whether it fits. You try types in the browser and see what the compiler produces, which makes the idiomatic output claim easy to check against your own taste before you install anything. It's also where the target-specific annotations make the most sense, because you can see exactly what an annotation changes in one output and leaves alone in the others.
It's early. The GitHub repository has a few dozen stars and a healthy list of open issues, three targets are supported with more listed as coming soon, and the community lives in Discord and GitHub discussions. It's a build step you have to adopt and keep in your pipeline, and it covers data types rather than behaviour, so it complements an RPC or API framework instead of replacing one.
Genotype is open source under the MIT license, written by Sasha Koss. There's no paid tier and no hosted service to sign up for. The site carries documentation, an interactive playground for trying the syntax in the browser, and links to the GitHub repository and the Discord. No contact email is published, so the repository and the Discord are the places to ask.
Key Features
- Compiles to TypeScript, Rust and Python
- Generics and recursive data types
- Target-specific annotations
- gt init and gt build CLI
- genotype.toml per-target configuration
- Browser playground and docs
Pros & Cons
What we like
- Idiomatic native output in every target
- Learnable in about 15 minutes
- No transport or storage format imposed
- MIT licensed with no paid tier
Room for improvement
- Early project with a small community
- Only three targets so far
- Adds a build step to your pipeline
- Covers types, not behaviour or RPC
Frequently Asked Questions
What is Genotype?
Is Genotype free?
Which languages does Genotype support?
How is Genotype different from other schema tools?
Best For
Featured in
Alternatives to Genotype
Kevin Gabeci
Solo developer building web apps, cozy browser games, and AI creator toolkits.

SoloDevStack
A solo developer blog built on head-to-head tool comparisons, 580+ posts deep.

Codedex
A gamified, story-driven platform that teaches Python, web dev, and more like an RPG quest
Vibe Built
Building real apps with agentic AI. What worked, what broke, what shipped.
Reviews (0)
Badge builder
Add Genotype to your website
Choose a badge style and size, preview it here, then copy the generated HTML. Badge images are self-contained SVGs and do not require an external script.
<a href="https://toolindex.net/tools/genotype-lang?ref=badge" target="_blank" rel="noopener">
<img src="https://toolindex.net/badge/genotype-lang/medium.svg" alt="Genotype - Listed on Tool Index" width="180" height="50" />
</a> How to use the badge
- 1. Pick the style, size, and theme that fit your layout.
- 2. Copy the generated HTML from the code block.
- 3. Paste it into your footer, homepage, or press page.
Standard badge available
The standard listing badge is available now. Score and circle badges are limited to tools currently ranked in the top 10 of a category.
Badge clicks return visitors to this profile with a referral tag so the source remains identifiable.
Related Tools
Kevin Gabeci
Solo developer building web apps, cozy browser games, and AI creator toolkits.

Coolify
Self-hostable, open source alternative to Heroku and Netlify

Warp
The modern terminal reimagined with AI and collaboration

Bolt.new
Prompt-to-deployed full-stack app inside the browser
Work on Genotype? Request listing access or correction