lua apps creates and runs web apps: pages and typed routes that belong to the agent. new writes a new app into the project; dev runs one on your machine. Neither pushes anything. Use lua test webapp to call one route and lua push webapp to create a version.
Requires lua-cli 3.42.0 or later.
Synopsis
Description
lua apps new
lua apps new <name> runs in the root of an agent project, where lua.skill.yaml is. It writes src/apps/<name>/:
It then edits two project files:
src/index.ts: imports the app and adds it towebAppson yournew LuaAgent({...}), creating the property when it is missing. When it cannot find the agent, orwebAppsis not an array, it leaves the file as it is and prints the two lines to add.tsconfig.json: addssrc/apps/*/webtoexclude, so the agent’s TypeScript build never loads the page project. When the file is not plain JSON (it has comments or trailing commas), it prints the line to add instead.
src/apps/<name> exists it stops. Run npm install in web/ afterwards; the command prints the next steps.
lua-cli 3.42 to 3.45 also write the page client into
web/src/lua/client.ts. To use the @lua-ai-global/app-client package instead, run npm install @lua-ai-global/app-client in web/, change from './lua/client' to from '@lua-ai-global/app-client' in web/src/main.tsx and web/src/App.tsx, and delete web/src/lua/client.ts.lua apps dev
lua apps dev <name> compiles the project and runs the app locally:
- The pages are served by the app’s own Vite (the one installed in
web/), with hot reload. The command prints the URL. - Every route call from the page runs in the sandbox on your machine, as you.
Dataandenv()are the live ones, as forlua test, so writes are real. The project’s.envis loaded once for the whole session. - Route files are watched. A change recompiles the routes, and the next call runs the new code. When the recompile fails, the previous routes keep serving and the error is printed.
Arguments
Options
Examples
Scaffold an app and install its page project:Output

