Build Your own template
Create a template bundle folder, add or override asset models, and validate the layout.
Create a local template bundle when a built-in template is close but not exact, or when your topology and physics need their own files.
Technical details
One folder per template bundle
A template bundle folder holds exactly one root .miravo.yaml entry file and any number of sibling .asset.yaml override files. A model reference resolves to a sibling model first, then to the shared built-in model.
Miravo discovers template bundles in this order: the current working directory, your personal template bundles, your namespaced personal template bundles, then the built-in templates.
Create or fork with the CLI
miravo init creates the bundle folder under ~/.miravo/templates/ (or $MIRAVO_HOME/templates/). Refer to it by name from then on.
miravo init packaging-lineValidate it before you run it.
miravo validate packaging-linemiravo models add also registers the new model in the bundle's entry template as an assignment with count: 1. Delete that assignment if you only want the file.
Built-in model references stay shared by default. To override a built-in model, copy it under its own name, for example miravo models add centrifugal-pump --in packaging-line --from centrifugal-pump, then edit the copy.
Validate the layout
Run validation after moving, renaming, or adding files.
miravo validate packaging-lineValidation fails when:
- the folder has zero or several root
.miravo.yamlfiles, - a model reference has no sibling or built-in
.asset.yaml, or - an asset file's name does not match its
model.name, as incentrifugal-pump.asset.yamlwithmodel.name: centrifugal-pump.
After validation passes, run lint for realism warnings.
miravo lint packaging-lineReference
| Path or command | Notes |
|---|---|
~/.miravo/templates/<bundle>/ | A personal template bundle folder |
~/.miravo/templates/<namespace>/<bundle>/ | A namespaced template bundle folder |
miravo init <name> | Create a template bundle folder |
miravo init <name> --from <src> | Copy a template bundle from a built-in, a namespace, or an absolute folder |
miravo models add <model> [--in <id>] | Add a blank asset model file and register it in the entry template |
miravo models add <model> --from <src> | Copy one model from a built-in, a namespace, or an absolute file |
miravo validate [<id>] | Check schema, references, and file layout |
miravo lint [<id>] [--strict] | Check physical realism rules |
MIRAVO_HOME | Moves personal template bundles, persisted state, auth, and integration targets to another base directory |
Related pages
Asset models
Asset type schema.
Templates
Template topology schema.
CLI reference
Authoring and validation commands.
Lint rules
Realism checks.
Was this page useful?
Last updated on
Lifecycle and faults
Model wear over operating hours and named failure modes that change runtime values, then see the health change in tags and protocol output.
Architecture
How Miravo moves data one way, from content files through the scheduler, generators, and asset graph to the event bus and protocol adapters.
Miravo