Skip to content

watch

watch

Watch command for Marianne CLI (#352 increment 3).

mzt watch SCORE [SHEET] — live-tail musician output as it streams from the conductor. Shows what each LLM is producing while it works, credential-redacted, with bounded memory (per-sheet ring buffers on the conductor side; a slow terminal drops lines with a [dropped] marker rather than ever slowing the conductor down).

The stream is a live view: it starts with the ring's retained recent lines, then follows new output until Ctrl-C. Conductor restarts clear the rings — persisted evidence lives in each sheet's recorded output tails (mzt diagnose).

Classes

Functions:

watch

watch(job_id=Argument(..., help="The score's run id (job id) to tail (see `mzt status`)"), sheet_num=Argument(None, help='Sheet number to tail. Omit to tail ALL sheets (lines arrive tagged [s<sheet>]).'))

Live-tail musician output for a running score.

Interactive sheets (claude-code's default) stream their raw tmux transcript; headless sheets stream their pipes.

Examples:

mzt watch my-score # All sheets, lines tagged [s] mzt watch my-score 3 # Only sheet 3

Source code in src/marianne/cli/commands/watch.py
def watch(
    job_id: str = typer.Argument(
        ...,
        help="The score's run id (job id) to tail (see `mzt status`)",
    ),
    sheet_num: int | None = typer.Argument(
        None,
        help="Sheet number to tail. Omit to tail ALL sheets "
        "(lines arrive tagged [s<sheet>]).",
    ),
) -> None:
    """Live-tail musician output for a running score.

    Interactive sheets (claude-code's default) stream their raw tmux
    transcript; headless sheets stream their pipes.

    Examples:
        mzt watch my-score        # All sheets, lines tagged [s<n>]
        mzt watch my-score 3      # Only sheet 3
    """
    try:
        asyncio.run(_watch(job_id=job_id, sheet_num=sheet_num))
    except KeyboardInterrupt:
        console.print("\n[dim]watch stopped[/dim]")