"""CLI entry for the Streamlit web app.

Usage:
    openrun-web                          # boots on http://localhost:8501
    openrun-web -- --server.port 8800    # forward args to streamlit
"""

from __future__ import annotations

import sys
from pathlib import Path


def main() -> None:
    from streamlit.web import cli as stcli  # imported lazily; streamlit is heavy

    app_path = Path(__file__).parent / "app.py"
    # Forward any user-supplied args after the entry; default to no extras.
    sys.argv = ["streamlit", "run", str(app_path), *sys.argv[1:]]
    sys.exit(stcli.main())


if __name__ == "__main__":
    main()
