config_cmd
config_cmd
¶
Daemon configuration management commands for Marianne CLI.
This module implements the mzt config command group for viewing
and managing the conductor daemon configuration file.
Subcommands:
- mzt config show — Display current config as a Rich table
- mzt config set — Update a config value
- mzt config path — Show config file location
- mzt config init — Create a default config file
Functions¶
config_callback
¶
Manage conductor configuration.
Source code in src/marianne/cli/commands/config_cmd.py
show
¶
show(config_file=Option(None, '--config', '-c', help='Path to daemon config file (default: ~/.marianne/daemon.yaml)'), show_all=Option(False, '--all', '-a', help='Show all fields (default: essential only)'), section=Option(None, '--section', '-s', help='Show only fields in a section (e.g., profiler, learning, socket)'))
Display current daemon configuration as a table.
By default shows only essential fields. Use --all for the full config or --section to drill into a specific section.
Examples:
mzt config show mzt config show --all mzt config show --section profiler
Source code in src/marianne/cli/commands/config_cmd.py
150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 | |
set_value
¶
set_value(key=Argument(..., help='Config key in dot notation (e.g., socket.path, max_concurrent_jobs)'), value=Argument(..., help='New value to set'), config_file=Option(None, '--config', '-c', help='Path to daemon config file (default: ~/.marianne/daemon.yaml)'))
Update a daemon configuration value.
Values are validated against the DaemonConfig schema before saving. Use dot notation for nested keys (e.g., socket.path, resource_limits.max_memory_mb).
Examples:
mzt config set max_concurrent_jobs 10 mzt config set socket.path /tmp/custom.sock mzt config set resource_limits.max_memory_mb 4096 mzt config set log_level debug
Source code in src/marianne/cli/commands/config_cmd.py
path
¶
path(config_file=Option(None, '--config', '-c', help='Path to daemon config file (default: ~/.marianne/daemon.yaml)'))
Show the daemon config file location.
Displays the resolved path and whether the file exists.
Examples:
mzt config path mzt config path --config /etc/marianne/daemon.yaml
Source code in src/marianne/cli/commands/config_cmd.py
init
¶
init(config_file=Option(None, '--config', '-c', help='Path to create config file (default: ~/.marianne/daemon.yaml)'), force=Option(False, '--force', '-f', help='Overwrite existing config file'))
Create a default daemon config file.
Generates a YAML config file with all default values and descriptive comments. Refuses to overwrite unless --force is given.
Examples:
mzt config init mzt config init --config /etc/marianne/daemon.yaml mzt config init --force
Source code in src/marianne/cli/commands/config_cmd.py
check
¶
Validate a daemon config file against the DaemonConfig schema.
Loads the YAML file, validates all fields, and reports the result. Exits 0 if valid, 1 if invalid or the file cannot be loaded.
Examples:
mzt config check --config my-daemon.yaml mzt config check