Skip to content
MyAppBuilder
StableReference

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

Example
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:

GroupExamples
Pagescreate_page, rename_page, duplicate_page, reorder_page, set_page_route, set_home_page, page folders
Componentsadd_component, delete_component, move_component, reparent_component, resize_component, update_component_prop, update_responsive_prop, group_components, ungroup_component, reusable components, insert_subtree (paste)
Navigationcreate_navigation, update_navigation, delete_navigation, set_route_parameter, set_query_parameter, open_page_as_modal
Bindings & actionscreate_data_binding, delete_data_binding, create_action, update_action, delete_action, set_event_actions
Data modelcreate_entity, rename_entity, delete_entity, add_field, update_field, move_field, create_relationship, pipelines
Data sourcescreate_data_source, update_data_source, delete_data_source, map_entity_source
Workflowscreate_workflow, update_workflow, delete_workflow, create_trigger, create_condition, add_workflow_node
Themeset_theme_token
Roles & permissionscreate_role, update_role, delete_role, set_permission
Assetsadd_asset, update_asset, delete_asset
APIscreate_api_source, update_api_source, delete_api_source
Statecreate_state_variable, update_state_variable, delete_state_variable
Project & settingsupdate_project, update_settings, update_auth_config, set_env_variable, delete_env_variable
Versions (server only)rollback_version, create_published_version

Who may issue what

IssuerAllowed
Editor UI (editors, admins, owners)All except the server-only commands
AI copilotAll except secrets/variables, assets, data sources, raw subtree inserts, project name/slug and server-only commands
ServerServer-only commands (recorded when you restore a version or publish)
ViewersNone (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).

Related

Was this helpful?