Index
cli
¶
Marianne CLI - modular command structure.
This package provides a modular CLI implementation for Marianne AI Compose. The CLI is built using Typer and organized into command modules for maintainability.
★ Insight ───────────────────────────────────── 1. Typer callback for global options: The @app.callback() decorator defines options that apply to ALL commands (--verbose, --quiet, --version). These callbacks run BEFORE any command, setting up shared state like output level and logging configuration.
-
Command registration via app.command(): Each command function is registered with the Typer app using app.command(). The function name becomes the CLI command name (with underscores converted to hyphens). Custom names are set via the
nameparameter. -
Modular command imports: Commands are organized in separate modules (run.py, status.py, etc.) and imported here for registration. This keeps the main init.py focused on assembly while command logic lives in dedicated files. ─────────────────────────────────────────────────
Package structure
cli/ ├── init.py # This file - app assembly (~150 LOC) ├── helpers.py # Shared utilities (~600 LOC) ├── output.py # Rich formatting (~400 LOC) └── commands/ ├── init.py # Command exports ├── compose.py # compose command ├── run.py # run command ├── status.py # status, list_jobs commands ├── resume.py # resume command ├── pause.py # pause, modify commands ├── cancel.py # cancel command ├── validate.py # validate command ├── recover.py # recover command (hidden) ├── diagnose.py # logs, errors, diagnose commands ├── dashboard.py # dashboard, mcp commands └── learning.py # patterns-, learning- commands
Classes¶
OutputLevel
¶
Bases: str, Enum
Output verbosity level.
Functions¶
create_notifiers_from_config
¶
Create Notifier instances from notification configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
notification_configs
|
list[NotificationConfig]
|
List of NotificationConfig from job config. |
required |
Returns:
| Type | Description |
|---|---|
list[Notifier]
|
List of configured Notifier instances. |
Source code in src/marianne/notifications/factory.py
version_callback
¶
verbose_callback
¶
quiet_callback
¶
log_level_callback
¶
log_file_callback
¶
log_format_callback
¶
conductor_clone_callback
¶
Set the active conductor clone name.
When --conductor-clone is passed, all daemon interactions are routed to a clone conductor instead of the production one. The clone has its own socket, PID file, state DB, and log file.
This enables safe testing without risking the production conductor.
Usage (always use = syntax): mzt --conductor-clone= status # Default clone mzt --conductor-clone=staging run x.yaml # Named clone
Source code in src/marianne/cli/__init__.py
main
¶
main(version=Option(False, '--version', '-V', callback=version_callback, is_eager=True, help='Show version and exit'), verbose=Option(False, '--verbose', '-v', callback=verbose_callback, is_eager=True, help='Show detailed output with additional information'), quiet=Option(False, '--quiet', '-q', callback=quiet_callback, is_eager=True, help='Show minimal output (errors only)'), conductor_clone=None, log_level=None, log_file=None, log_format=None)
Marianne AI Compose - Orchestration system for AI agent workflows.