1 Commits

Author SHA1 Message Date
58ff3fe59a feat(cli): add --version flag to unmix CLI 2026-11-02 14:46:07 +01:00

View File

@ -22,6 +22,26 @@ app = typer.Typer(
console = Console(stderr=True)
def version_callback(value: bool) -> None:
if value:
print(f"unmix v{__version__}")
raise typer.Exit()
@app.callback()
def main(
version: bool | None = typer.Option(
None,
"--version",
"-v",
help="Show version and exit.",
callback=version_callback,
is_eager=True,
),
) -> None:
"""Audio analysis pipeline decomposing songs into song packages."""
@app.command()
def analyze(
file: Path = typer.Argument(..., help="Path to input audio or video file", exists=True, readable=True),