Skip to content
Version v0.35 ยท supported
[WIP] Pending copyedit and approval.

Scripting

When a command needs more than a single action, you attach a Lua script. Lua is the small scripting language Amri profiles use for logic: conditions, loops, return values, and the full amri.* function library. Simple commands need no Lua, but it is there when a command grows.

Page What it does
Functions Call an amri.* function as a command response.
Variables and scopes Store and read values, and the scope chain they follow.
The command context Read what was said, and details of the current command, through ctx.
Speech and prompts Speak to the user and ask for a spoken answer.
Tasks Background loops, and how to stop them.
API reference Every amri.* function, grouped by namespace.