Mochi documentation
Mochi is a small statically typed language for scripting, agents, and AI tools. This documentation covers the language, the standard library, and the toolchain.
Get started
- Quickstart. Install Mochi and run a program in five minutes.
- Tutorial. Build a complete Mochi program from scratch.
- System requirements. Supported platforms and prerequisites.
Language manual
The Mochi Manual documents the language in depth.
- Language basics. Core syntax and concepts.
- Variables.
let,var, and destructuring. - Functions. Defining and calling functions.
- Types. Primitive types, structs, and union types.
- Control flow.
if,for,while,match. - Packages. Organizing code into packages.
- Agents and streams. Event-driven, reactive programming.
- Generative AI. Built-in
generateblocks.
Reference
- Language reference. Concise syntax reference.
- Keywords. All reserved keywords.
- Operators. All operators and precedence.
- Built-ins. Standard built-in functions.
Design proposals
- Mochi Enhancement Proposals (MEPs). Design documents for the language, the type system, and the toolchain.