Open Source · Apache 2.0

Write the template.
Skip the repetition.

TLang is a compiled template language that generates code across any technology stack — from a single, readable source of truth. AI writes the template once. TLang enforces it everywhere.

tlang compile-run Main.tlang

AI code generation doesn’t scale

Every file, every service, every entity requires the model to reason from scratch — consuming tokens and producing output that is, at best, probably correct. Multiply that across 200 files and the cost becomes hard to justify.

Switching to cheaper models trades one problem for another. A cheaper model that generates subtly wrong code across 200 files is far more expensive to fix than the tokens you saved.

There is a better approach.

One template. Every output.

Compiled, not interpreted

TLang compiles to bytecode. Generate thousands of files in milliseconds from a single template.

Any target language

Generate Kotlin, Java, TypeScript, HTML, YAML, Rust — from the same template definition.

Structural generation

Templates operate on models. One model, many outputs. Add an entity; every file updates.

AI-native workflow

Ask AI to write the template once. TLang handles the scale. Expensive reasoning happens once.

LSP & MCP support

Full Language Server Protocol for editors. Model Context Protocol for AI assistants.

Package system

Share templates across projects. Import framework adapters. Compose generators.

From template to output in one compile

Template — written once
lang [kotlin] entity(pkg: String, name: String) {
    pkg ${pkg}
    impl[data class] ${name}(
        val id: Long,
        val name: String
    )
}
Generated for every entity
package com.example.model

data class User(
    val id: Long,
    val name: String
)

data class Product(
    val id: Long,
    val name: String
)

Ready to generate?

TLang is open source under the Apache 2.0 license.