"""CLI entry point for Robot Resources."""

import click

from robot_resources.cli.commands.report import report


@click.group()
@click.version_option(package_name="robot-resources-router")
def cli() -> None:
    """Robot Resources - Intelligent LLM cost optimization."""
    pass


cli.add_command(report)


@cli.command()
@click.option("--host", default="127.0.0.1", help="Host to bind to")
@click.option("--port", default=3838, help="Port to bind to")
@click.option("--reload", is_flag=True, help="Enable auto-reload for development")
def start(host: str, port: int, reload: bool) -> None:
    """Start the Robot Resources proxy server."""
    import uvicorn

    click.echo(f"Starting Robot Resources proxy on {host}:{port}")
    uvicorn.run(
        "robot_resources.proxy.server:app",
        host=host,
        port=port,
        reload=reload,
    )


@cli.command()
def status() -> None:
    """Show proxy status and statistics."""
    click.echo("Robot Resources v2.0.0")
    click.echo("Status: Not implemented yet")


if __name__ == "__main__":
    cli()
