Config File: config-file

Manage a persistent configuration file stored at ~/.config/mttctl/config.toml. Values set here are applied automatically on every invocation, so you do not have to repeat connection options or other defaults on every command. Command-line flags always override config file values.

# Show current config file contents
mttctl config-file show

# Print the path to the config file
mttctl config-file path

# Set a persistent default value
mttctl config-file set host 192.168.1.100
mttctl config-file set port 4403
mttctl config-file set serial /dev/ttyUSB0

# Remove a previously set value (revert to built-in default)
mttctl config-file unset host
mttctl config-file unset serial

Subcommands

SubcommandDescription
showPrint the current config file contents as TOML
set <KEY> <VALUE>Set a persistent default value
unset <KEY>Remove a key, reverting to the built-in default
pathPrint the filesystem path of the config file

Available Keys

KeyDescriptionEquivalent flag
hostDefault TCP host--host
portDefault TCP port--port
serialDefault serial device path--serial

Example Config File

~/.config/mttctl/config.toml:

host = "192.168.1.100"
port = 4403