Feature request
Generate a complete CRUD scaffold for a given entity in one command:
mxcli scaffold crud MyModule.Customer -p app.mpr
What it generates:
MyModule.Customer_Overview — overview page with a data grid and New/Edit/Delete buttons
MyModule.Customer_NewEdit — new/edit page with input fields for all attributes
MyModule.ACT_New_Customer — microflow: create object, show NewEdit page
MyModule.ACT_Save_Customer — microflow: validate, commit, close page
MyModule.ACT_Delete_Customer — microflow: delete with confirmation, return to overview
- Navigation menu item pointing to the Overview page (optional,
--nav <profile>)
Options:
--module <name> — override output module (default: entity's module)
--nav <profile> — add a navigation menu item to the named profile
--output <file.mdl> — write generated MDL to a file for review before exec (default: apply directly)
--layout <name> — layout to use for pages (default: project default)
Rationale
This is the most common pattern in Mendix development. Hand-writing it three times per entity (as experienced during testing) is the highest-friction part of app generation. A scaffold command eliminates it and also gives LLMs a reliable, convention-correct starting point.
Strategic context
Discussed in docs/01-project/MXCLI_STRATEGIC_POSITIONING.md (Section 10) as a Starlark generation pattern:
Implementation patterns — CRUD, approval workflows, master-detail pages — are quantitative: given the same inputs, the correct output is always the same. These should move to Starlark generation scripts.
The scaffold command is the user-facing entry point; the underlying implementation can be a built-in Starlark script (patterns/crud.star) that emits MDL and is invoked by mxcli scaffold crud. This makes the pattern inspectable, overridable, and composable with org-specific conventions.
Non-goals
Feature request
Generate a complete CRUD scaffold for a given entity in one command:
What it generates:
MyModule.Customer_Overview— overview page with a data grid and New/Edit/Delete buttonsMyModule.Customer_NewEdit— new/edit page with input fields for all attributesMyModule.ACT_New_Customer— microflow: create object, show NewEdit pageMyModule.ACT_Save_Customer— microflow: validate, commit, close pageMyModule.ACT_Delete_Customer— microflow: delete with confirmation, return to overview--nav <profile>)Options:
--module <name>— override output module (default: entity's module)--nav <profile>— add a navigation menu item to the named profile--output <file.mdl>— write generated MDL to a file for review before exec (default: apply directly)--layout <name>— layout to use for pages (default: project default)Rationale
This is the most common pattern in Mendix development. Hand-writing it three times per entity (as experienced during testing) is the highest-friction part of app generation. A scaffold command eliminates it and also gives LLMs a reliable, convention-correct starting point.
Strategic context
Discussed in
docs/01-project/MXCLI_STRATEGIC_POSITIONING.md(Section 10) as a Starlark generation pattern:The scaffold command is the user-facing entry point; the underlying implementation can be a built-in Starlark script (
patterns/crud.star) that emits MDL and is invoked bymxcli scaffold crud. This makes the pattern inspectable, overridable, and composable with org-specific conventions.Non-goals
mxcli exec --resolve-order) — tracked separately in issue Feature: Auto-resolve statement dependencies in exec (hoisting) #53 (closed wontfix; current SQL-script convention of manual ordering is the intended approach)