universalIdentifier and the correct defineEntity() call.
You can also pass the entity type directly to skip the first prompt:
Available entity types
What the scaffolder generates
Each entity type has its own template. For example,yarn twenty dev:add object asks for:
- Name (singular) — e.g.,
invoice - Name (plural) — e.g.,
invoices - Label (singular) — auto-populated from the name (e.g.,
Invoice) - Label (plural) — auto-populated (e.g.,
Invoices) - Also create a view, navigation menu item, and record page layout for this object? — if you answer yes, the scaffolder also generates a table view, a sidebar entry, a record page layout and the fields view it displays, which is what makes the new object usable right away.
field entity type is more detailed: it asks for the field name, label, type (from a list of all available field types like TEXT, NUMBER, SELECT, RELATION, etc.), and the target object’s universalIdentifier.
Custom output path
Use the--path flag to place the generated file in a custom location: