Builder commands
Everything you do in the builder, and everything the AI or a template does for you, becomes a command : a small, named change to the project definition such as "add component", "rename page" or "set theme token". Commands are checked before they are applied, applied all-or-nothin
Everything you do in the builder, and everything the AI or a template does for you, becomes a command: a small, named change to the project definition such as "add component", "rename page" or "set theme token". Commands are checked before they are applied, applied all-or-nothing in a transaction, and saved as a new version. That one rule is why undo always works, why versions can be compared and restored, and why the AI can never produce something the editor would not.
Why this matters to you
- Undo is reliable: a transaction reverts completely, never half-way.
- History is readable: Versions › Version history lists each transaction with a description such as "Resize Customers table" or "AI: Added a Booking page".
- The AI is safe: it emits the same commands as the editor, limited to an allowed list, validated the same way.
- Templates are repeatable: a template is a list of commands applied to an empty app.
What a command looks like
Transaction "Add a Booking page" v41 → v42
1. create_page { name: "Booking", route: "/booking", icon: "CalendarPlus" }
2. add_component { pageId: pg_booking, componentType: "booking_form" }
3. create_entity { name: "Bookings", fields: [...] }Every command has a type and a payload; ids are generated when missing and written back so the transaction can be replayed exactly. After the whole transaction is applied, structural rules are checked (every component belongs to a page, references exist, no cycles); if anything fails, nothing is saved.
Command groups
There are 83 commands. The complete, generated list with every command and whether the AI may use it lives at Builder commands (full list). The main groups, with examples:
| Group | Examples |
|---|---|
| Pages | create_page, rename_page, duplicate_page, reorder_page, set_page_route, set_home_page, page folders |
| Components | add_component, delete_component, move_component, reparent_component, resize_component, update_component_prop, update_responsive_prop, group_components, ungroup_component, reusable components, insert_subtree (paste) |
| Navigation | create_navigation, update_navigation, delete_navigation, set_route_parameter, set_query_parameter, open_page_as_modal |
| Bindings & actions | create_data_binding, delete_data_binding, create_action, update_action, delete_action, set_event_actions |
| Data model | create_entity, rename_entity, delete_entity, add_field, update_field, move_field, create_relationship, pipelines |
| Data sources | create_data_source, update_data_source, delete_data_source, map_entity_source |
| Workflows | create_workflow, update_workflow, delete_workflow, create_trigger, create_condition, add_workflow_node |
| Theme | set_theme_token |
| Roles & permissions | create_role, update_role, delete_role, set_permission |
| Assets | add_asset, update_asset, delete_asset |
| APIs | create_api_source, update_api_source, delete_api_source |
| State | create_state_variable, update_state_variable, delete_state_variable |
| Project & settings | update_project, update_settings, update_auth_config, set_env_variable, delete_env_variable |
| Versions (server only) | rollback_version, create_published_version |
Who may issue what
| Issuer | Allowed |
|---|---|
| Editor UI (editors, admins, owners) | All except the server-only commands |
| AI copilot | All except secrets/variables, assets, data sources, raw subtree inserts, project name/slug and server-only commands |
| Server | Server-only commands (recorded when you restore a version or publish) |
| Viewers | None (read-only) |
Where commands show up
- Version history: one entry per transaction with its source badge (Edit, AI, Template, Publish, Restore, System).
- View changes / Compare: the resulting differences between two versions.
- AI result card: the change list of the AI's transaction.
- Export configuration (JSON) in the project menu: the current definition those commands produced.
Common mistakes
- Expecting records to be commands. Data records are not part of the project definition; they are not versioned or undoable.
- Expecting publish to be undoable with Ctrl+Z. Publishing is recorded as a system command but is managed through Deployments (rollback).
Advanced
Payload schemas live in COMMAND_PAYLOADS (src/core/commands/schemas.ts), handlers in applyCommands() (src/core/commands/engine.ts); both run in the browser (optimistic) and on the server (authoritative) with identical code. SYSTEM_COMMANDS and AI_ALLOWED_COMMANDS define exposure. Transactions carry a baseVersion for optimistic concurrency and are rate-limited (300 per minute per user).