"""sagellm CLI: Ollama-style command-line interface for sageLLM.

This module is the package-level CLI entrypoint.
All functionality is implemented in modular subpackages under sagellm.cli/

New structure:
    sagellm/cli/
        ├── main.py           # CLI entry point
        ├── commands/         # Command modules
        ├── utils/            # Utilities (console, config, backend, display)
        └── hardware/         # Hardware detection

Usage:
    sagellm info                     # Show system info
    sagellm serve                    # Start inference server
    sagellm run -p "prompt"           # Single inference
    sagellm demo --workload year1    # Run demo validation
    sagellm config [show|reset]      # Manage configuration

Examples:
    $ sagellm info
    $ sagellm serve --port 8901  # SagePorts.SAGELLM_SERVE_PORT
    $ sagellm run -p "Hello world"
    $ sagellm demo --workload year1 --output metrics.json
"""

from __future__ import annotations

# Import main entry point from refactored CLI
from .cli.main import main


def setup_wizard() -> None:
    """Entry point for `sagellm-setup` script."""
    from .cli.commands.setup import setup

    setup.main(prog_name="sagellm-setup", standalone_mode=True)


# Re-export package entry points
__all__ = ["main", "setup_wizard"]

# Version
try:
    from sagellm import __version__
except ImportError:
    __version__ = "0.1.0"


if __name__ == "__main__":
    main()
