MiravoMiravo

CLI Reference

Command reference for miravo: lifecycle control, runtime mutations, exports, content inspection, and platform operations.

Control the environment lifecycle, mutate a running environment, inspect content, and automate platform work from shells, CI jobs, health checks, and recovery scripts.

Global options

OptionPurpose
--debugPrint stack traces for unexpected failures
--verboseShorthand for --log-level debug
--quietSuppress all output except errors
--plainKeep stable plain text output
--log-level <level>Select debug, info, warn, or error
--log-format <format>Select pretty or json

Commands

GroupCommands
Lifecyclestart · stop · pause · resume · speed · load · reset
Inspectionstatus · logs
Instancesspawn · remove · inject
Adaptersadapter
Contentinit · add · validate · lint · catalog · models · templates
Platformexport · apply · cleanup · platforms
Shellcompletion

miravo completion

Print a static completion script for Bash, Zsh, or Fish. The script completes commands, aliases, options, and fixed option values. It does not scan the filesystem. It does not call Miravo while completing.

mkdir -p ~/.local/share/bash-completion/completions
miravo completion bash > ~/.local/share/bash-completion/completions/miravo

For Zsh, keep ~/.zsh/completions in fpath before compinit.

fpath=(~/.zsh/completions $fpath)

Open a new shell after writing the completion file.

ArgumentPurpose
shellbash, zsh, or fish

Side effects: writes the script to stdout. The redirection creates the completion file.

Exit codes: 0 success, 1 unsupported shell.

miravo start

Start an environment from a built-in template, a local template, none for a stateless empty boot, or a comma-separated template list.

miravo start -t smart-factory

Use none by itself. If no --name or MIRAVO_NAME is set, Miravo generates an environment name. It cannot be combined with comma-separated template lists.

miravo start -t smart-factory,water-treatment
FlagPurpose
-t, --template <id|name|path,...>Pick the boot template, use none by itself for a stateless zero-instance boot, or pass a comma-separated boot+load list
-n, --name <name>Override the generated or derived environment name
-d, --detachRun detached in background and return to shell
--dry-runValidate config and print the summary without starting
--no-inputDisable prompts and use non-interactive defaults
-s, --speed <multiplier>Set the time multiplier
--no-mqttDisable the embedded MQTT broker
FlagDefaultPurpose
-n, --name <name>Template/namespace derived or generatedEnvironment name
-t, --template <id|name|path,...>Auto-detectedEnvironment id, name, path, none by itself for stateless empty boot, or comma-separated list
-s, --speed <multiplier>1Time multiplier
--seed <number>RandomDeterministic RNG seed
--tick <ms>1000Tick interval
-p, --mqtt-port <number>1883MQTT port
--mqtt-host <host>0.0.0.0MQTT bind host
--mqtt-mode <mode>embeddedMQTT mode: embedded or external
--mqtt-url <url>UnsetExternal MQTT broker URL
--mqtt-username <username>UnsetExternal MQTT username
--mqtt-password <password>UnsetExternal MQTT password
--no-mqttEnabledDisable MQTT
--opcuaDisabled unless template enables itEnable OPC UA
--opcua-port <number>4840OPC UA port
--opcua-host <host>Adapter defaultOPC UA bind host
--modbusDisabled unless template enables itEnable Modbus TCP
--modbus-port <number>1502Modbus port
--modbus-host <host>Adapter defaultModbus bind host
--admin-host <host>127.0.0.1Admin bind host
--admin-port <number>8080Admin bind port
-d, --detachfalseStart as one detached process
--dry-runfalseValidate without starting
--no-inputfalseDisable prompts
--no-uiUI enabledDisable the embedded Console
--no-authAuth enabledDisable admin auth
--reset-statefalseIgnore any saved snapshot
--summary-interval <seconds>5Seconds between summary lines

Side effects: starts the engine, admin server, enabled adapters, and the embedded Console unless --no-ui is set. Detached mode writes runtime metadata under ~/.miravo.

Exit codes: 0 success or dry-run validation, 1 invalid input or config, 2 startup dependency failure.

miravo status

Read live engine health, metrics, and instance details from a running environment.

miravo status
FlagPurpose
--watchPoll every second and redraw until interrupted
--instance <id>Focus on one instance
--jsonEmit machine-readable JSON
--discoverDiscover runtimes over MQTT and exit
FlagDefaultPurpose
--name <name>UnsetTarget one environment name
--discoverfalseDiscover and exit
-w, --watchfalsePoll for updates
--instance <id>UnsetShow one instance
--jsonfalseMachine-readable output
--admin-url <url>URL precedence chainOverride the admin target
--template <path>MIRAVO_TEMPLATEMQTT discovery connection info
--timeout <seconds>5Admin request timeout

Side effects: read-only. --discover uses MQTT instead of the admin server.

Exit codes: 0 success, 1 invalid admin URL or bad local input, 2 transport failure, 3 runtime rejection.

miravo stop

Stop detached runtime or an explicit admin target.

miravo stop
FlagDefaultPurpose
--admin-url <url>URL precedence chainOverride the admin target
--jsonfalseMachine-readable output
--timeout <seconds>10Shutdown timeout

Side effects: stops the detached target and clears the local detached pointer when that target matches the local runtime.

Exit codes: 0 success, 1 local target resolution failure, 2 transport failure, 3 runtime rejection.

miravo logs

Stream runtime events over WebSocket from a detached pointer or explicit admin target.

miravo logs
FlagDefaultPurpose
--tail <n>UnsetFetch the last n events before streaming
--channels <list>faults,lifecycle,instances,engine,adaptersRestrict channels (tick also supported)
--jsonfalseEmit NDJSON
--admin-url <url>URL precedence chainOverride the admin target

Side effects: opens a streaming connection and keeps the process attached until interrupted.

Exit codes: 0 clean stream shutdown, 1 local target resolution failure, 2 transport failure.

miravo spawn

Add new instances from a model name.

miravo spawn centrifugal-pump
FlagDefaultPurpose
-c, --count <n>1Number of instances to create
--name <instance-id>UnsetExact runtime instance id when count is 1
--prefix <prefix>Model-derivedGenerate ids like <prefix>-001
--protocols <list>Enabled adaptersLimit exposure to mqtt, opcua, and/or modbus
--jsonfalseMachine-readable output
--admin-url <url>URL precedence chainOverride the admin target
--timeout <seconds>5Admin request timeout

Side effects: creates new instances. Re-running the command creates more. Use --name for one exact id, --prefix to avoid shared defaults like motor-001, and --protocols mqtt,opcua to scope exposure.

Exit codes: 0 success, 1 bad input, 2 transport failure, 3 runtime rejection.

miravo remove

Remove one instance by id.

miravo remove pump-003
miravo remove pump-003 --yes
FlagDefaultPurpose
--yesfalseSkip the confirmation prompt
--jsonfalseMachine-readable output
--admin-url <url>URL precedence chainOverride the admin target
--timeout <seconds>5Admin request timeout

Side effects: deletes the instance. TTY runs prompt unless --yes is set. Non-interactive runs require --yes.

Exit codes: 0 success, 1 bad input or missing confirmation, 2 transport failure, 3 runtime rejection.

miravo pause

Pause the running environment without destroying state.

miravo pause
FlagDefaultPurpose
--jsonfalseMachine-readable output
--admin-url <url>URL precedence chainOverride the admin target
--timeout <seconds>5Admin request timeout

Side effects: stops tick advancement while keeping runtime state in memory.

Exit codes: 0 success, 1 bad input, 2 transport failure, 3 runtime rejection.

miravo resume

Resume a paused environment.

miravo resume
FlagDefaultPurpose
--jsonfalseMachine-readable output
--admin-url <url>URL precedence chainOverride the admin target
--timeout <seconds>5Admin request timeout

Side effects: restarts tick advancement for the current runtime.

Exit codes: 0 success, 1 bad input, 2 transport failure, 3 runtime rejection.

miravo speed

Set the time multiplier on a running environment.

miravo speed 10
FlagDefaultPurpose
--jsonfalseMachine-readable output
--admin-url <url>URL precedence chainOverride the admin target
--timeout <seconds>5Admin request timeout

Side effects: changes runtime speed immediately.

Exit codes: 0 success, 1 invalid multiplier or bad local input, 2 transport failure, 3 runtime rejection.

miravo load

Load additional instances into a running environment.

miravo load -t smart-factory
FlagPurpose
templateArgTemplate id, name, path, or - for stdin
-t, --template <id|name|path,...>Template selector when no positional arg is used
-c, --count <n>Number of copies to load per template
--name-prefix <prefix>Prefix generated runtime ids with <prefix>-...
--dry-runPrint the load request without sending it
FlagDefaultPurpose
templateArgUnsetTemplate id, name, path, or - for stdin
-t, --template <id|name|path,...>MIRAVO_TEMPLATEEnvironment selector
-c, --count <n>1Copies to load per template
--name-prefix <prefix>Template idPrefix generated runtime ids
--dry-runfalsePrint without mutating runtime
--jsonfalseMachine-readable output
--admin-url <url>URL precedence chainOverride the admin target
--timeout <seconds>5Admin request timeout

Side effects: creates additional instances or template runs. Re-running the same command adds more runtime content.

Exit codes: 0 success or dry run, 1 bad input or missing template, 2 transport failure, 3 runtime rejection.

miravo reset

Remove all instances and template runs.

miravo reset
FlagDefaultPurpose
--clear-persistencefalseRemove saved state for the next boot
--yesfalseSkip the confirmation prompt
--jsonfalseMachine-readable output
--admin-url <url>URL precedence chainOverride the admin target
--timeout <seconds>5Admin request timeout

Side effects: clears in-memory runtime state. --clear-persistence also removes the persisted snapshot. TTY runs prompt unless --yes is set. Non-interactive runs require --yes.

Exit codes: 0 success, 1 bad input or missing confirmation, 2 transport failure, 3 runtime rejection.

miravo inject

Trigger or clear faults on a running instance.

miravo inject
FlagDefaultPurpose
--clearfalseClear the named fault instead of triggering it
--jsonfalseMachine-readable output
--name <name>UnsetTarget one environment name
--admin-url <url>URL precedence chainOverride the admin target
--timeout <seconds>5Admin request timeout

Side effects: mutates runtime fault state. No positional args opens the interactive picker on a TTY.

Exit codes: 0 success, 1 bad input or missing TTY for interactive mode, 2 transport failure, 3 runtime rejection.

miravo adapter

Manage runtime protocol adapters.

enable

miravo adapter enable mqtt
FlagDefaultPurpose
-p, --port <number>Adapter defaultOverride the adapter port
--host <host>Adapter defaultOverride the bind host
--jsonfalseMachine-readable output
--admin-url <url>URL precedence chainOverride the admin target
--timeout <seconds>5Admin request timeout

disable

miravo adapter disable opcua
FlagDefaultPurpose
--jsonfalseMachine-readable output
--admin-url <url>URL precedence chainOverride the admin target
--timeout <seconds>5Admin request timeout

inspect

miravo adapter inspect modbus --json
FlagDefaultPurpose
namemodbusInspect one adapter surface
--jsonfalseMachine-readable output
--admin-url <url>URL precedence chainOverride the admin target
--timeout <seconds>5Admin request timeout

Side effects: enable and disable mutate live adapter state. inspect is read-only.

Exit codes: 0 success, 1 invalid adapter name or bad local input, 2 transport failure, 3 runtime rejection.

miravo export

Export platform payloads from local content or a running environment. The subcommand prefix identifies the target platform — le-* subcommands target Litmus Edge. Console alternative: Console platforms.

le-template

miravo export le-template -t smart-factory
FlagDefaultPurpose
-t, --template <id>RequiredEnvironment id, name, or path
--host <hostname>localhostSource hostname embedded in device endpoints
--protocol <name>Template protocolOverride protocol to opcua, modbus, or mqtt
--name-prefix <prefix>Template idPrefix generated runtime ids and LE aliases before underscore conversion
-o, --output <prefix>Template idOutput prefix for .le-template.json and -tags.csv

Side effects: writes <prefix>.le-template.json and <prefix>-tags.csv. No running environment is required. For catalog/env templates, export uses the same env-aware runtime ID generation as miravo load. --name-prefix overrides that shared prefix.

le-tags

miravo export le-tags --device DTW-FAB-PLC --protocol opcua
FlagDefaultPurpose
--device <name>RequiredLitmus Edge device name
--protocol <name>Requiredopcua, modbus, or mqtt
--instance <id>AllRestrict export to one instance
-o, --output <file>stdoutWrite CSV to a file
--admin-url <url>URL precedence chainOverride the admin target
--timeout <seconds>5Admin request timeout

Side effects: reads the runtime manifest and prints or writes CSV.

le-dt

miravo export le-dt centrifugal-pump
FlagDefaultPurpose
modelRequiredModel name to export
-o, --output <file>stdoutWrite JSON to a file

Side effects: reads the local model YAML and prints or writes one Digital Twins model JSON in the Litmus Edge format. No running environment is required.

Exit codes: 0 success, 1 bad local input or missing local content, 2 manifest transport failure for le-tags.

miravo apply

Apply Miravo resources to an external platform. The first argument is the platform target. Use le or litmus-edge for Litmus Edge. More platforms are in the works. Console alternative: Console platforms.

miravo apply le --target demo --template smart-factory --dry-run
FlagPurpose
--target <label>Use a saved platform environment
--template <path>Pick the template to provision
--source-hostname <host>Set the address the platform uses to reach Miravo
--name-prefix <prefix>Prefix generated runtime ids and LE device / DT instance aliases
--protocol <name>Pick mqtt, opcua, or modbus
--scope <scope>Limit the plan to selected resource types
--dry-runPrint the plan without applying it
FlagDefaultPurpose
--target <label>UnsetNamed environment from ~/.miravo/platforms/targets.json
--le-hostname <host>LITMUS_EDGE_HOSTNAME or saved envLitmus Edge hostname or IP
--le-api-token <token>LITMUS_EDGE_API_TOKEN or saved envLitmus Edge API token
--template <path>RequiredTemplate name or file path
--name-prefix <prefix>Template idPrefix generated runtime ids and LE aliases
--protocol <name>Template protocol or opcuaProtocol
--scope <scope>devices,models,instancesResource scope
--area <name>UnsetFilter by area name
--line <name>UnsetFilter by line name
--instance <id>UnsetFilter by instance id
--source-hostname <host>MIRAVO_SOURCE_HOSTNAME or saved envSource hostname
--if-unmanaged <policy>failCollision policy: fail or skip
--dry-runfalsePrint the plan only
--jsonfalseEmit JSON plan

Side effects: dry-run only plans. A mutating run checks platform auth, resolves the desired state, then creates or updates Miravo-managed devices and instances. Existing single-name Digital Twins models are treated as unchanged; schema changes require cleanup then apply.

Exit codes: 0 success, 1 invalid input, blockers, or plan failures, 2 platform transport failure, 3 remote platform rejection.

miravo cleanup

Delete Miravo-managed resources from an external platform. The first argument is the platform target. Use le or litmus-edge for Litmus Edge. More platforms are in the works. Console alternative: Console platforms.

miravo cleanup le --target demo --template smart-factory --dry-run
FlagPurpose
--template <path>Scope cleanup to one template
--all-managedRemove all Miravo-managed resources
--scope <scope>Limit cleanup to selected resource types
--dry-runPrint the cleanup plan without deleting
--yesConfirm a mutating cleanup
FlagDefaultPurpose
--target <label>UnsetNamed environment from ~/.miravo/platforms/targets.json
--le-hostname <host>LITMUS_EDGE_HOSTNAME or saved envLitmus Edge hostname or IP
--le-api-token <token>LITMUS_EDGE_API_TOKEN or saved envLitmus Edge API token
--template <path>Required unless --all-managedTemplate name or file path
--scope <scope>instances,models,devicesResource scope
--area <name>UnsetFilter by area name
--line <name>UnsetFilter by line name
--instance <id>UnsetFilter by instance id
--all-managedfalseIgnore template scoping and remove all managed resources
--dry-runfalsePrint the plan only
--jsonfalseEmit JSON plan
--yesfalseSkip the confirmation prompt

Side effects: a mutating run deletes managed instances, models, and devices in dependency order. The command only retries transient platform transport failures before it exits.

Exit codes: 0 success, 1 invalid input, missing confirmation, or cleanup failures, 2 platform transport failure, 3 remote platform rejection.

miravo platforms

Manage saved platform environments. Console alternative: Console platforms.

Saved targets live under ~/.miravo/platforms/targets.json. The command resolves exact ids first, then case-insensitive exact labels.

Side effects: add, update, and remove mutate the saved target store. remove prompts on TTY unless --yes is set; non-interactive runs require --yes. test sends a lightweight Litmus Edge probe.

Exit codes: 0 success, 1 bad input or failed connectivity test, 2 external platform transport failure.

miravo init

Create an environment folder with one root .miravo.yaml entry file. With --from, copy the entry file from a built-in id, a namespaced environment, or an absolute environment folder. Built-in forks keep model references shared. Local and namespaced forks also copy sibling .twin.yaml overrides.

miravo init packaging-line
Argument or flagPurpose
nameEnvironment id and destination folder. Omit to initialize the current folder.
--from <src>Copy from <builtin-id>, <namespace>/<env-id>, or /abs/path/to/env-folder.

Side effects: writes an environment folder. init has no --json output.

Exit codes: 0 success, 1 bad input, missing source, or write conflict.

miravo add

Add one .twin.yaml model file to an environment. Without --from, Miravo creates a blank model scaffold. With --from, it copies a shared built-in model, a model from a namespaced environment, or an absolute .twin.yaml file.

miravo add coolant-pump --in packaging-line
Argument or flagPurpose
modelNew local model name. The output filename is <model>.twin.yaml.
--in <id>Target environment id. Defaults to the current environment folder.
--from <src>Copy from <builtin-model-id>, <namespace>/<env-id>/<model>, or /abs/path/to/file.twin.yaml.

Side effects: writes one sibling .twin.yaml file. add has no --json output.

Exit codes: 0 success, 1 bad input, missing environment, missing source, or write conflict.

miravo validate

Validate one environment folder. Validation checks the entry schema, model schemas, template-to-model references, and filename-to-model.name matches.

miravo validate
Argument or flagPurpose
idEnvironment id, namespaced id, or path. Omit to validate the current environment.
--jsonEmit machine-readable diagnostics.

Side effects: read-only.

Exit codes: 0 valid, 1 bad input or missing environment, 2 internal failure, 3 validation failed.

miravo lint

Run deterministic realism checks against one environment folder. Lint warnings do not block by default. Use --strict when warnings should fail CI.

miravo lint
Argument or flagPurpose
idEnvironment id, namespaced id, or path. Omit to lint the current environment.
--strictExit non-zero when warnings are found.
--jsonEmit machine-readable diagnostics.

Realism rules

RuleFlagsFix
Vibration couplingRotating assets expose vibration signals without speed, load, or torque signals.Add a coupled driver such as speed, load, torque, or current, then make vibration respond to it.
Thermal tauTemperature members jump too quickly or lack a time constant.Model thermal lag with a first-order response or another slow generator.
Timetable MRN overlayMaintenance or reliability state is driven like a fixed schedule instead of an operating-hours signal.Drive MRN-style state from operating hours, runtime, load, or lifecycle progression.
Observation on read-writeWritable members are modeled as observations.Keep operator-set values writable and model sensor observations as separate readable members.
Lifecycle stage jumpLifecycle stages skip directly across large wear intervals.Add intermediate stages or adjust thresholds so wear progression is gradual.
Observation scaleObserved values use ranges or noise that are implausible for the unit and process.Tighten eu_range, units, and noise around the expected process envelope.
Fault running guardFaults can trigger while the asset is stopped even though the failure needs operation.Add a running, speed, load, or enabled guard to the fault trigger.

Side effects: read-only.

Exit codes: 0 clean or warnings in non-strict mode, 1 bad input or missing environment, 2 internal failure, 3 warnings found with --strict.

Lint never rewrites files. Fix the model or entry file, then run miravo validate and miravo lint again.

miravo catalog

Browse built-in environment starters and shared models. catalog is read-only and only shows built-in content.

Side effects: read-only.

Exit codes: 0 success, 1 missing built-in id or bad input.

miravo models

List or inspect discoverable asset models. miravo models and miravo models list do the same work. Output includes the source label for each model.

Side effects: read-only.

Exit codes: 0 success, 1 missing model or bad local path.

miravo templates

List or inspect discoverable environments. miravo templates and miravo templates list do the same work, and both show each environment source.

Side effects: list and inspect are read-only. remove deletes the environment folder. --purge-state also removes the persisted state snapshot. TTY runs prompt unless --yes is set. Non-interactive runs require --yes.

Exit codes: 0 success, 1 missing environment, bad input, or missing confirmation, 2 internal failure, 3 refused (built-in, multi-source, or running environment).

Reference

Exit codeMeaning
0Command succeeded
1Bad arguments, bad local input, missing TTY, missing content, or write conflict
2Transport, dependency, or internal environment failure
3Validation failure, strict lint warning, runtime rejection, or platform rejection
SurfaceMiravo runtime required
start, init, add, validate, lint, catalog, models, templates, completion, export le-template, export le-dtNo
status, stop, logs, spawn, remove, pause, resume, speed, load, reset, inject, adapter, export le-tagsYes
apply le / apply litmus-edge, cleanup le / cleanup litmus-edge, platforms target *No Miravo runtime. Uses Litmus Edge or the local environment store

Was this page useful?

Last updated on