![]()
CLI
The CLI (command-line interface) can be used to interact with the RTI and Inhumate Suite applications via command-line for testing and scripting purposes. It’s kinda like a swiss-army knife.
Installing
Since it’s a command-line tool, you might be interested in one-liner install.
On macOS or Linux:
curl -fsSL https://get.nm8.co/install.sh | bash
On windows:
iwr https://get.nm8.co/install.ps1 -useb | iex
Or you can download the package (Windows, MacOS or Linux) and install manually.
Once installed, you’ve got an rti command to play with in your favorite command-line shell.
Quick Start
With a local RTI running, start by asking for a snapshot of the connected system:
rti status
The CLI connects to ws://127.0.0.1:8000 by default. Use --rti for another broker and --federation when connecting to a particular federation:
rti --rti ws://simulation-host:8000 --federation training status
Every command has its own help, for example rti monitor --help. The complete top-level command list is:
Usage: rti [command] [options]
Options:
-r|--rti <url> URL of RTI to connect to
-f|--federation <id> Federation ID
-v|--version Show version
-u|--user User
-p|--password Password
-s|--secret Secret
-C|--no-color Don't use any color
-?|-h|--help Show help information
Commands:
channels List channels
clients List clients
cmd Execute a command
end End simulation or playback
entity Manipulate entity
error Publish an error
federations List federations
geometry Manipulate geometry
inject Inject situations into scenario
launch Launch processes
license Show license information
load Load scenario
log Manipulate current log
measurements Get measurements from current log
measures List measures
messages Get messages from current log
mocksim Run a mock simulator
monitor Listen and printout messages
participant List participants or register participant
passwd Change user password
pause Pause simulation or playback
play Start playback
publish Publish something
remote Remote control
reset Reset simulation or playback
scale Set time scale
scenario Get current scenario
scenarios List scenarios
seek Seek playback to scenario time
shutdown Shutdown processes
start Start simulation
status Get current clients, channels, log
stop Stop simulation or playback
subscribe Subscribe to one or more channels
wait Wait for client state update
Usage Examples
The CLI can inspect an RTI, publish test data, observe traffic, and operate Suite applications:
# List connected clients and registered channels
rti clients
rti channels
# Publish and receive plain text on a channel
rti publish demo/message "Hello from the CLI"
rti subscribe demo/message
# Print common RTI traffic until interrupted
rti monitor
# Control a simulation session
rti load "Example scenario"
rti start
rti pause
rti reset
# List commands advertised by applications, then execute one
rti cmd
rti cmd example argument=value
# List and start a Launcher configuration
rti launch --list
rti launch Demo --parameter station=simulator-1
# Inspect the current Recorder log
rti log
Commands that keep listening, such as subscribe and monitor, run until interrupted with Ctrl+C. Use rti <command> --help to see command-specific arguments and options.