CLI Reference
Complete Miravo CLI command reference — start, ps, stop, logs, inject, spawn, adapter, fork, models, templates, speed, and reset with all flags and env vars.
Complete command reference for the miravo CLI.
Global Options
Section titled “Global Options”| Option | Default | Description |
|---|---|---|
--log-level <level> | info | debug, info, warn, error |
--log-format <format> | pretty | pretty or json |
--verbose | — | Alias for --log-level debug |
-q, --quiet | — | Suppress formatted output and non-error logs |
--plain | — | Plain text output (no colors/formatting) |
Priority: -q/--quiet > --log-level > --verbose. The NO_COLOR env var forces plain output.
miravo start
Section titled “miravo start”Start a simulation.
miravo start --template smart-factorymiravo start --template ./custom.miravo.yaml --name my-simmiravo start -d # Detach (background daemon)| Option | Env Var | Default | Description |
|---|---|---|---|
-t, --template <name|path> | MIRAVO_TEMPLATE | Auto-select | Template to run |
-n, --name <name> | MIRAVO_NAME | Template-derived | Simulation name |
-s, --speed <n> | — | From template | Time multiplier |
-p, --mqtt-port <port> | MIRAVO_MQTT_PORT | 1883 | MQTT broker port |
--mqtt-host <host> | MIRAVO_MQTT_HOST | 127.0.0.1 | MQTT bind host |
--mqtt-mode <mode> | MIRAVO_MQTT_MODE | embedded | embedded or external |
--mqtt-url <url> | MIRAVO_MQTT_URL | — | External broker URL |
--no-mqtt | — | — | Disable MQTT |
--opcua | — | Disabled | Enable OPC UA |
--opcua-port <port> | MIRAVO_OPCUA_PORT | 4840 | OPC UA port |
--opcua-host <host> | MIRAVO_OPCUA_HOST | 0.0.0.0 | OPC UA bind host |
--admin-port <port> | MIRAVO_ADMIN_PORT | 8080 | Admin HTTP port |
--admin-host <host> | MIRAVO_ADMIN_HOST | 127.0.0.1 | Admin bind host |
-d, --detach | — | — | Run as background daemon |
--dry-run | — | — | Validate without running |
--seed <n> | — | Random | RNG seed |
--tick <ms> | — | From template | Tick interval |
--summary-interval <s> | — | 30 | Periodic summary log interval |
miravo ps
Section titled “miravo ps”List running background simulations.
miravo psmiravo ps --jsonmiravo stop
Section titled “miravo stop”Stop a running simulation.
miravo stop my-simmiravo stop my-sim --timeout 10miravo logs
Section titled “miravo logs”Stream domain events from a running simulation via WebSocket.
miravo logs my-simmiravo logs my-sim --tail 50miravo logs my-sim --channels faults,lifecycleAvailable channels: tick, faults, lifecycle, instances, engine, adapters.
miravo status
Section titled “miravo status”View simulation metrics and state.
miravo statusmiravo status --watchmiravo status --instance pump-001miravo status --jsonmiravo status --discover # MQTT-based discoverymiravo inject
Section titled “miravo inject”Trigger or clear faults. Interactive picker when arguments are omitted.
miravo inject pump-001 cavitationmiravo inject pump-001 cavitation --clearmiravo inject # Interactive mode (TTY)miravo spawn
Section titled “miravo spawn”Add instances to the running simulation.
miravo spawn centrifugal-pumpmiravo spawn centrifugal-pump --count 5miravo remove
Section titled “miravo remove”Remove an instance.
miravo remove pump-003miravo pause / resume
Section titled “miravo pause / resume”miravo pausemiravo resumemiravo speed
Section titled “miravo speed”Set the simulation time multiplier (1-1000).
miravo speed 50miravo reset
Section titled “miravo reset”Remove all instances and template runs.
miravo resetmiravo reset --clear-persistencemiravo load
Section titled “miravo load”Load additional instances from a template.
miravo load ./extra-pumps.miravo.yamlmiravo load smart-factory --count 2miravo adapter
Section titled “miravo adapter”Manage protocol adapters at runtime.
miravo adapter enable opcua --port 4840miravo adapter disable mqttmiravo models
Section titled “miravo models”miravo models listmiravo models inspect centrifugal-pumpmiravo models inspect centrifugal-pump --rawmiravo templates
Section titled “miravo templates”miravo templates listmiravo templates inspect smart-factorymiravo templates inspect smart-factory --rawmiravo fork
Section titled “miravo fork”Copy built-in content to the local registry for customization.
miravo fork model centrifugal-pumpmiravo fork template smart-factorymiravo fork template smart-factory --models-onlymiravo fork template smart-factory --forcemiravo rm
Section titled “miravo rm”Force-remove stale daemon registry entries.
miravo rm old-simmiravo rm old-sim --force