Scalar command는 app 또는 library 안에 scalar type을 생성하거나 제거합니다. scalar는 database-backed document model이 아니라 reusable data type 또는 value object입니다.
Scalar name은 space 제거 후 Akan scalar file convention에 맞게 정규화됩니다.
create-scalar
Create a new scalar type for reusable value objects or simple data shapes that do not need DB persistence.
The generator normalizes the scalar name and creates the scalar files used by constants, documents, dictionaries, and typed business code.
Signature
Arguments
Argument
Type
Required
Default
Description
scalarName
String
yes
-
Scalar name. Spaces are removed and the first letter is lowercased.
scalarName
Type
String
Required
yes
Default
-
Description
Scalar name. Spaces are removed and the first letter is lowercased.
Options
Option
Type
Default
Enum / Flag
Description
--ai
Boolean
false
-
Use AI to create scalar before normal scalar creation.
--ai
Type
Boolean
Default
false
Enum / Flag
-
Description
Use AI to create scalar before normal scalar creation.
Notes
Name
Description
execution
When --ai is true, createScalarWithAi runs before createScalar.
execution
Description
When --ai is true, createScalarWithAi runs before createScalar.
Examples
remove-scalar
Remove an existing scalar type from an app or library.
Use it after checking usages, because scalar definitions are often imported by modules, dictionaries, templates, and service payload types.