TypeScript syntax. Native performance. AI-first. The language for building intelligent applications.
curl -fsSL https://lex-lang.org/install.sh | sh
Write code that feels familiar. Classes, interfaces, generics, arrow functions — all the ergonomics you love.
Compiles directly to LLVM IR. No garbage collector, no runtime overhead. Real integers, real threads.
Built-in support for AI agents, tools, and LLM integration. Create intelligent applications with zero boilerplate.
First-class support for Model Context Protocol. Build MCP servers that work with Claude, Cursor, and more.
Your entire application compiles to one executable. No dependencies, no containers, no deployment complexity.
Target macOS, Linux, Windows, and WebAssembly from the same codebase. Write once, run everywhere.
// hello.lex
fn main(): i32 {
Terminal.log("Hello, Lex!")
return 0
}
import { Agent, agent } from "std/agent"
import { Claude } from "std/ai/claude"
const assistant = agent("code-helper")
.withModel(Claude.sonnet())
.withTools(createFileSystemTools())
.build()
const result = assistant.run("Review my code")
---
// pages/Ola.lsx — a requisicao e nativa do formato
const nome: string = Lex.params.get("nome")
if (len(nome) == 0) { Lex.notFound() }
---
<h1>Ola, {nome}!</h1>
Get started with Lex in under a minute.