import typer

from vdash.utils.crypto import CryptoHelper
from .migrate import app as migrate_app

app = typer.Typer(help="Vdash command line interface.")
app.add_typer(migrate_app, name="migrate")


@app.command(name="generate-key")
def generate_key():
    """Generate a new secret key to be used in Settings."""
    key = CryptoHelper.generate_key()
    typer.echo(key)
