Scaffold a component¶
simkit component init <kind> <ref> creates a single <id>.<kind>.kts
file in the current directory, ready to edit. The .kts is the
whole component — one file is everything you need.
Prerequisites¶
- SimKit CLI installed and authenticated (see installation).
Pick the kind¶
Four kinds, four subcommands:
simkit component init data-type <your-namespace>:my-type:1.0.0
simkit component init method <your-namespace>:my-method:1.0.0
simkit component init workflow-type <your-namespace>:my-workflow:1.0.0
simkit component init material <your-namespace>:my-material:1.0.0
Each writes a single file in the current directory:
- my_type.data-type.kts
- my_method.method.kts
- my_workflow.workflow-type.kts
- my_material.material.kts
The filename uses snake-case from the component id; the component reference uses the original (kebab-case) id. A newly scaffolded component is a snapshot while you iterate — that is the default, so you don't need to declare it explicitly. When the component is ready, you promote it to a released version (see Release a component).
Where to put the file¶
Anywhere on disk. The SimKit CLI doesn't require a Gradle project or a specific layout. A typical convention is:
<your-namespace>/
my-type/
my_type.data-type.kts
my-method/
my_method.method.kts
Dockerfile # method-side artifacts, simkit ignores
src/ # same
my-workflow/
my_workflow.workflow-type.kts
For methods that wrap an executable (a Docker image), the surrounding
directory holds the native-side build artifacts alongside the .kts.
The simkit component build step only consumes the .kts.
What the scaffold contains¶
A minimal <kind> { … } skeleton with placeholder blocks for every
required and most-common-optional sub-block:
- For data types:
dependencies,metadata,dataSchema. Stubs formetadataSchema,uiSchema, the two validation rule sets. - For methods:
dependencies,metadata,dataInterface,configurationSchema,executable,codeGeneration. Stubs forvalidationRuleSetandresourceEstimation. - For workflow types:
dependencies,metadata,dataInterface,configurationSchema,workflowDefinition. Stubs formigrationRoutes,analysisStrategy,uiConfiguration,validationRuleSet,migrationRuleSet.
Comments mark every block.
Next steps¶
- Fill in
dependencies,dataInterface,configurationSchema. - For workflow types, draft the
workflowDefinition(operations, data mapping). See concepts: workflow-definition. - For methods, point
executableat your image. - For data types, write your
dataSchema. See concepts: schema language. - Add validation rules where data has constraints — add a validation rule.
When ready, simkit component build produces the registry zip, then
simkit component register <zip> posts it. The
first-workflow-type tutorial
is the end-to-end walkthrough.
Cross-references¶
- Concepts: components and versions
—
group:id:versionreference shape, snapshot vs released. - Concepts: data types, methods, workflow types.
- Reference: SimKit CLI —
initcommand options.