style-apply
Take an existing Style (.claw/styles/<id>/) and apply it to a Template instance, producing one or more outputs.
Inputs
styleId: id of an existing Style. List withclaw style list.templateId: id of an existing Template. List withclaw template list [--category <cat>].variantId: optional, defaults to the template's first variant.data: a JSON file with values for the template's slots.format: one or more ofhtml,pdf,png,svg,pptx. Defaults tohtml.
Procedure
- Confirm both resources exist:
claw style get <styleId> claw template get <templateId> - Compose the
data.jsonfor the template's slots. For each slot the template declares:kind:heading,subheading,body,list,quote,metric,image,logo,button,divider,shape,table.required: whether to fail if missing.maxLength/maxItems: respect these or surface a warning.
- Render:
claw template render <templateId> --style <styleId> --data data.json --format <fmt> --out <path> - Register the output as a generated example under the style for future "more like this" requests.
Constraints
- Never edit the Style as a side effect of applying it. Applying is a read on the Style.
- If a slot is required and missing, fail with a clear error pointing at the slot id.
- Multiple formats can be produced in one call:
--format pdf,png,html.