import typer
from flashenv.commands import env
from flashenv.commands.init import init_cmd
from flashenv.commands.cost import cost_command
from flashenv.commands.nuke import nuke_command

app = typer.Typer()
app.add_typer(env.app, name="env")


@app.command("init")
def init():
    """
    Initializes the configuration directory and generates the RSA key pair.
    """
    typer.echo("🔄 Initializing flashenv...")
    init_cmd()


app.command("nuke")(nuke_command)

app.command("cost")(cost_command)

if __name__ == "__main__":
    app()
