API Reference
All methods are available on the global g object.
Error handling depends on the engine:
- JavaScript & Janet: Every method returns its result directly and throws on error — use
try/catch. - Lua: Methods return a tuple
(result, error). If the first value isnilorfalse, the second value contains the error message.
See Scripting Overview for details.
For scripting support files, use Tools > Developer > Generate Scripting Support Files… in Guida. The dialog can generate TypeScript definitions (scripting-api.d.ts), Lua and Janet guides (scripting-api.lua, scripting-api.janet), workspace LLM instructions, and TypeScript authoring scaffold files.
This reference is divided into the following categories:
- Browser & DOM: Navigation, tabs, DOM manipulation, screenshots, and layout.
- Data & Storage: Persistent store, queues, full-text search, databases, and S3-compatible storage.
- System & Automation: Background workers, workflows, event triggers, and network traffic.
- AI, HTTP & Tools: Local LLMs, speech recognition, text-to-speech, HTTP client, secrets, and utilities.