Miravo

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
Contentmodels · templates · fork
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, or a comma-separated template list.

miravo start -t smart-factory
FlagPurpose
-t, --template <id|name|path,...>Pick the boot template or a comma-separated boot+load list
-n, --name <name>Override the environment name
-d, --detachRun as one background process
--dry-runValidate config and print the summary without starting
-s, --speed <multiplier>Set the time multiplier
--no-mqttDisable the embedded MQTT broker
FlagDefaultPurpose
-n, --name <name>Template or namespace derivedEnvironment name
-t, --template <id|name|path,...>Auto-detectedTemplate id, name, path, or comma-separated list
--catalog-dir <path>MIRAVO_CATALOG_DIRCatalog root
--models-dir <path>UnsetExtra model search path
-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>502Modbus port
--modbus-host <host>Adapter defaultModbus bind host
--admin-host <host>0.0.0.0Admin bind host
--admin-port <number>8080Admin bind port
-d, --detachfalseStart as one detached process
--dry-runfalseValidate without starting
--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 state, metrics, and instance details from a running environment.

miravo status
FlagPurpose
--watchPoll and redraw the status view
--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

Request a clean shutdown from a detached environment.

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 domain events from a detached environment over WebSocket.

miravo logs
FlagDefaultPurpose
--tail <n>UnsetFetch the last n events before streaming
--channels <list>All except tickRestrict channels
--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
--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.

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
--dry-runPrint the load request without sending it
FlagDefaultPurpose
templateArgUnsetTemplate id, name, path, or - for stdin
-t, --template <id|name|path,...>MIRAVO_TEMPLATETemplate selector
--catalog-dir <path>MIRAVO_CATALOG_DIRCatalog root
-c, --count <n>1Copies to load per template
--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>RequiredTemplate id, name, or path
--host <hostname>localhostSource hostname embedded in device endpoints
--protocol <name>Template protocolOverride protocol to opcua, modbus, or mqtt
-o, --output <prefix>Template idOutput prefix for .le-template.json and -tags.csv
--models-dir <path>UnsetExtra model search path
--catalog-dir <path>MIRAVO_CATALOG_DIRCatalog root

Side effects: writes <prefix>.le-template.json and <prefix>-tags.csv. No running environment is required.

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
--catalog-dir <path>MIRAVO_CATALOG_DIRCatalog root

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
--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
--catalog-dir <path>MIRAVO_CATALOG_DIRCatalog root
--template <path>RequiredTemplate name or file path
--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, models, and instances.

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
--catalog-dir <path>MIRAVO_CATALOG_DIRCatalog root for template resolution
--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 retries failed cleanup attempts 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 models

List or inspect discoverable asset models. miravo models and miravo models list do the same work.

Side effects: read-only.

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

miravo templates

List or inspect discoverable templates. miravo templates and miravo templates list do the same work.

Side effects: read-only.

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

miravo fork

Copy a model or template into the local registry for customization.

model

miravo fork model centrifugal-pump
FlagDefaultPurpose
--forcefalseOverwrite an existing local copy
--catalog-dir <path>MIRAVO_CATALOG_DIRCatalog root

template

miravo fork template water-treatment
FlagDefaultPurpose
--forcefalseOverwrite an existing local copy
--models-onlyfalseFork only referenced models
--catalog-dir <path>MIRAVO_CATALOG_DIRCatalog root

Side effects: writes files under ~/.miravo/registry/local/models and ~/.miravo/registry/local/templates.

Exit codes: 0 success, 1 missing content or write conflict.

Reference

Exit codeMeaning
0Command succeeded
1Bad arguments, bad local input, missing TTY, missing content, or validation failure
2Transport or environment failure
3Runtime or external platform rejected the requested action
SurfaceMiravo runtime required
start, models, templates, fork, 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