Tea
DocsExamplesReferenceCommunity
GitHub

Tea Language

A strongly typed scripting language for native tools.

© 2026 Tea Language.

ContributingCommunityRepository

Get Started

InstallationGetting StartedCLI

Language

SyntaxTypesFunctionsStructsGenericsPattern MatchingError HandlingModulesTesting

Project

Code StyleContributing

Get Started

CLI

The current `tea` CLI supports direct execution, native builds, formatting, and test discovery.

The tea CLI covers the full everyday workflow: run a script, build a binary, format your files, and run tests. Most users only need a few commands to stay productive.

tea hello.tea
tea build hello.tea
tea fmt .
tea test

Start by running a source file directly. When you want a standalone executable, switch to tea build. The formatter and test runner use the same command shape, so the CLI stays consistent as projects grow.

Run a script

Running a Tea file directly is the fastest feedback loop. Pass the script path first, then any arguments you want to forward into the program.

tea hello.tea
tea examples/echo/main.tea hello world

Build a binary

Use tea build when you want a native executable you can run later without pointing back to the source file. By default, Tea writes the result under bin/.

tea build hello.tea
./bin/hello

tea build app.tea --output ./dist/app

Format source files

The formatter rewrites Tea files in place. Run it on the current directory for a whole project, or point it at a specific file when you only want to clean up one source.

tea fmt .
tea fmt src/main.tea
tea fmt . --check

Run tests

The test runner discovers Tea test blocks from the paths you give it. You can run a whole test directory, list discovered tests, or narrow execution with a filter.

tea test
tea test tests/
tea test --list
tea test --filter parser

Next steps

Continue to

Testing

Write `test` blocks and assertions.

Continue to

std.args

Build argument-aware CLIs with stdlib helpers.