Tea — a strongly typed scripting language
Tea
DocsPlaygroundExamplesReferenceCommunity
GitHub

Tea Language

A strongly typed scripting language for native tools.

© 2026 Tea Language.

Agent documentationContributingCommunityRepository

Get Started

InstallationGetting StartedCLI

Tutorial

Build a CLI with Tea1. Display your first task2. Display several tasks3. Track task status4. Accept commands5. Read saved tasks6. Add tasks7. Complete tasks8. Organize and test9. Build your executable

Language

SyntaxTypesFunctionsStructsGenericsPattern MatchingError HandlingModulesTesting

Project

Code StyleContributing

Read as Markdown

Docs

Documentation

Language and workflow guides based on the current compiler, examples, and CLI implementation.

New to Tea? Build a CLI with Tea walks you through a complete task-list program, one working feature at a time.

Writing Tea with a coding agent? Start with the agent documentation index or the Markdown quick reference. For documentation matching your installed version, run tea docs.

Get Started

Installation

Install a prebuilt Tea release and verify the CLI.

Getting Started

Run your first script and compile a binary.

CLI

Run, build, format, and test Tea programs.

Tutorial

Build a CLI with Tea

Start here: build a persistent task-list CLI in nine short chapters.

1. Display your first task

Run a Tea file and turn a binding into useful output.

2. Display several tasks

Use a list and a loop to number your tasks.

3. Track task status

Model tasks with structs and format them with a function.

4. Accept commands

Read arguments, filter tasks, and explain how to use the tool.

5. Read saved tasks

Load a text file and handle failures with typed errors.

6. Add tasks

Validate a title and save a new task between runs.

7. Complete tasks

Find a task by number and update its status safely.

8. Organize and test

Extract a module and test the logic behind your CLI.

9. Build your executable

Check, format, and compile the finished tool.

Language

Syntax

Bindings, blocks, strings, and core syntax.

Types

Primitive values, lists, dicts, optionals, and inference.

Functions

Named functions, lambdas, locals, and return values.

Structs

Custom data types with named fields.

Generics

Type parameters for functions and structs.

Pattern Matching

Use `case` to branch on variants and values.

Error Handling

Typed errors, `throw`, and `catch` blocks.

Modules

Split code across files and import stdlib modules.

Testing

Write `test` blocks and use `std.assert`.

Project

Code Style

Formatting and style conventions for Tea and Rust.

Contributing

Build, test, and contribute to the compiler and docs.