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

Tutorial

Display your first task

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

Chapter 1 of 9 · Build a CLI with Tea

Choose a chapter
  1. Build a CLI with Tea
  2. 1. Display your first task
  3. 2. Display several tasks
  4. 3. Track task status
  5. 4. Accept commands
  6. 5. Read saved tasks
  7. 6. Add tasks
  8. 7. Complete tasks
  9. 8. Organize and test
  10. 9. Build your executable

Start in the tea-tasks directory you created in the overview. Create a file named tasks.tea and put these two lines in it:

tasks.tea

const title = "Learn Tea"
@println(`Task: ${title}`)

Run the file:

tea tasks.tea
Task: Learn Tea

That's the starting point for the task list. Tea runs statements at the top level of a file, so you don't need to declare an entrypoint function.

Read the two lines

const title = "Learn Tea" creates a binding named title. Tea infers that it holds a String from the value on the right. const prevents you from assigning a different value to that binding. We'll introduce var when we need a value that changes.

@println(...) writes a value followed by a newline. The @ identifies a built-in operation supplied by Tea; functions you write yourself don't use that prefix.

Double quotes make an ordinary string. Backticks make an interpolated string: the ${title} expression is evaluated and its value becomes part of the text. You can embed other expressions there too.

You don't need semicolons. A newline separates these statements.

Try it yourself

Change the task title and add a second line of output that says why you want to learn Tea. Run the file again.

One possible solution
const title = "Automate my daily notes"
@println(`Task: ${title}`)
@println("I want a small tool I can run from my terminal.")

You now have a file you can edit and run. Next, you'll turn that single task into a list.

Read more: bindings and strings, built-in output functions.

PreviousBuild a CLI with TeaNext2. Display several tasks