Skip to main content

Module cli

Module cli 

Source
Expand description

CLI command parsing, helpers, and command execution.

Structs§

Cli
Top-level CLI parser.
GlobalFlags
Global flags accepted by every command.

Enums§

Commands
CLI subcommands — parsing only, no execution logic.
OnOff
PlayModeArg
QueueAction
Queue sub-subcommands.

Functions§

format_duration_human
Format a duration string for human-readable output.
format_time_ms
Format milliseconds as M:SS or H:MM:SS.
parse_duration
Parse a duration string (e.g. “30m”, “1h”, “90m”) into HH:MM:SS format.
playback_icon
Format a playback state as an icon string.
playback_label
Format a playback state as a word.
require_speaker_only
Resolve –speaker flag for speaker-only commands (bass, treble, loudness). Rejects –group with a validation error.
resolve_group
Resolve –group / –speaker flags to a Group handle.
resolve_speaker
Resolve –speaker / –group flags to a Speaker handle.
run_command
validate_seek_time
Validate a seek time string (H:MM:SS or HH:MM:SS format).