Tea
DocsPlaygroundExamplesReferenceCommunity
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

Project

Code Style

Follow the repo’s current formatting conventions for both Rust and Tea source.

The most important style rules are the Tea ones. If you are writing Tea code, keep it simple, consistent, and easy to scan before worrying about contributor-specific Rust conventions in the repository.

Tea style

Tea source favors a compact, readable style: short blocks, consistent naming, and formatting that stays close to what the language examples already use.

Tea

Recommended conventions

  • Use 2-space indentation.
  • Prefer snake_case names.
  • End block forms with end.
  • Use backticks for interpolation.

When in doubt, format Tea files with the CLI rather than hand-tuning whitespace.

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

Contributor note

If you are working on the compiler or docs repository itself, follow the checked-in Rust conventions too: run cargo fmt --all, prefer anyhow::Result and thiserror patterns, and avoid .unwrap() outside tests.

Next steps

Continue to

Contributing

See the full dev workflow.

Continue to

Testing

Format and test changes before sending them upstream.