"""First-time setup: create master password."""

import typer

from mb_stash.cli.context import use_context


def init(ctx: typer.Context) -> None:
    """First-time setup: create master password."""
    app = use_context(ctx)
    password: str = typer.prompt("Create master password", hide_input=True, confirmation_prompt=True)
    app.svc.init(password)
    app.out.print_init_done()
