Skip to content

Start Here

Genotype is a programming language designed to help developers synchronize types between TypeScript, Rust, and Python (more languages coming soon).

To get familiar with the Genotype programming language, see Quick Genotype Language Tour. It will lead you through all the language features, show you how to use them, and link to more detailed documentation.

To learn more about the specific Genotype targets, see:

Follow the steps below to get started with Genotype or, alternatively, to play with Genotype without installing it, try Genotype Playground.

Install the Genotype CLI to get started:

Terminal window
curl -fsSL https://genotype-lang.org/install.sh | sh

See Genotype Installation for more options.

Run gt init to bootstrap a new Genotype project. It will ask you a few questions and generate genotype.toml and source files for your project:

Terminal window
gt init

See the CLI reference for more information about the Genotype CLI.

To set up a project manually, create genotype.toml in your project directory. This matches the configuration generated by gt init for a directory named my-package:

name = "my-package"
version = "0.1.0"
[ts]
enabled = true
[ts.manifest]
name = "my-package"
[py]
manager = "uv"
enabled = true
[py.manifest.project]
name = "my-package"
[rs]
enabled = true
[rs.manifest.package]
name = "my_package"
edition = "2024"

See Configuration Reference for more details.

Create a new file .type in the src directory and add your types, for example src/user.type:

User: {
name: FullName,
email: string,
}
FullName: {
first: string,
last?: string,
}

See the Quick Tour for more information about the language.

Run gt build to generate code for the targets configured in genotype.toml:

Terminal window
gt build

The generated files go into the output directories selected during initialization. Run the command again after editing your types.

See the CLI reference for more build options.

Run gt skill install to install the Genotype agent skill. gt init also has the option to install the skill during project setup. See Agent Skill for more info.

The documentation is also available as llms.txt, an index for AI tools, and llms-full.txt, the full documentation in a single text file. Give your agent these links when it needs documentation without browsing the website.