Skip to content

CLI application

kurra.cli.app

The kurra command-line application entry point.

main

main(version: bool = False)

Entry point callback for the kurra CLI, run before any subcommand.

Parameters:

Name Type Description Default
version bool

If True, print the installed kurra version and exit.

False

Raises:

Type Description
Exit

Raised after printing the version when version is True.

Source code in kurra/cli/app.py
@app.callback(invoke_without_command=True)
def main(
    version: Annotated[bool, typer.Option("--version", "-v", is_eager=True)] = False,
):
    """Entry point callback for the kurra CLI, run before any subcommand.

    Args:
        version: If True, print the installed kurra version and exit.

    Raises:
        typer.Exit: Raised after printing the version when `version` is True.
    """
    if version:
        console.print(__version__)
        raise typer.Exit()