Skip to main content
lua compile builds every primitive reachable from the LuaAgent in src/index.ts into dist-v2/. It is a local build: nothing is sent to the platform and nothing changes for end users. lua push, lua test, and lua chat run it for you. Verified against lua-cli 3.33.0.

Synopsis

Description

The compiler reads src/index.ts, follows the LuaAgent to its skills and tools, webhooks, triggers, jobs, workflows, processors, MCP servers, devices and device triggers, and voices, validates each one, and bundles it with esbuild. A primitive that is not registered on the agent is not compiled. Validation errors are listed with file and line, and the command ends with βœ– compile_failed. Output goes to dist-v2/, which the command adds to .gitignore: After bundling, the command syncs lua.skill.yaml: a row for each compiled primitive with its name and version, a new row for anything new, and no row for anything removed from the code. Server ids are never written here; lua push registers new primitives. When the project files differ from the last backup it prints πŸ“¦ Project sources changed. Run `lua push backup` to sync. --sync needs a credential and an agentId; without them the check is skipped silently and the command still exits 0, so a CI job that must fail on drift runs lua sync --check instead. It compares the agent’s name, persona, model, and governance with the server before compiling and prints the differences with the lua sync commands that resolve them. It reads only and never stops the build. The line ℹ️ Server sync skipped β€” nothing was sent to the server; `lua push` publishes. in the output means the compile did not reconcile ids and versions with the server; lua push, lua sync, and lua chat -e sandbox run that reconciliation as part of their own compile.

Arguments

None.

Options

Examples

Compile and print the summary:
Output
See what was bundled and where:
Output
Report drift first and keep CI logs quiet:

Exit codes

See also