{"library":"reflex-hosting-cli","title":"Reflex Hosting CLI","description":"The `reflex-hosting-cli` is a command-line interface tool designed to streamline the deployment of Reflex web applications to the Reflex hosting service. It provides commands for logging into the hosting platform and deploying projects with ease. Currently at version 0.1.62, it is under active development, often receiving updates in sync with the core Reflex framework.","language":"python","status":"active","last_verified":"Sun May 17","install":{"commands":["pip install reflex-hosting-cli"],"cli":{"name":"reflex","version":"sh: 1: reflex: not found"}},"imports":["from reflex_hosting_cli.config import Config"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import subprocess\nimport os\nimport sys\n\n# This quickstart demonstrates the typical command-line flow for\n# deploying a Reflex application using reflex-hosting-cli.\n# It requires 'reflex' and 'reflex-hosting-cli' to be installed.\n\nproject_name = \"my_quickstart_app\"\n# Ensure we start clean for the quickstart\nif os.path.exists(project_name):\n    print(f\"Removing existing project '{project_name}' for a clean start...\")\n    subprocess.run([\"rm\", \"-rf\", project_name], check=True)\n\ntry:\n    print(f\"1. Initializing a new Reflex project: '{project_name}'...\")\n    # This command uses the 'reflex' CLI, a prerequisite.\n    subprocess.run([\"reflex\", \"init\", project_name], check=True, capture_output=True, text=True)\n    print(f\"   Project '{project_name}' initialized.\")\n    os.chdir(project_name)\n\n    print(\"\\n2. Logging into Reflex Hosting (requires manual interaction or pre-configured token)...\")\n    print(\"   Please run 'rx-host login' in your terminal and follow prompts.\")\n    print(\"   For this quickstart, we assume you are already logged in or will log in interactively.\")\n    # You would typically run: `subprocess.run([\"rx-host\", \"login\"], check=True)`\n    # This is commented out as it requires interactive input.\n\n    print(\"\\n3. Deploying the Reflex project...\")\n    print(\"   Note: This command requires active Reflex hosting credentials.\")\n    # Using --yes to skip interactive confirmation if possible.\n    # check=False because actual deployment success depends on external factors (account, network, etc.)\n    # and we want the quickstart script itself to complete without error due to failed deployment.\n    result = subprocess.run([\"rx-host\", \"deploy\", \"--yes\"], capture_output=True, text=True)\n    print(\"   Deployment command output:\")\n    print(result.stdout)\n    if result.stderr:\n        print(\"   Deployment command errors:\")\n        print(result.stderr)\n    print(\"\\n   Deployment command finished. Check the output above for status.\")\n\nexcept FileNotFoundError as e:\n    print(f\"\\nError: Command '{e.filename}' not found. Please ensure 'reflex' and 'reflex-hosting-cli' are installed and in your system's PATH.\", file=sys.stderr)\n    print(\"Install with: pip install reflex reflex-hosting-cli\", file=sys.stderr)\nexcept subprocess.CalledProcessError as e:\n    print(f\"\\nAn error occurred during command execution: {e}\", file=sys.stderr)\n    print(f\"STDOUT:\\n{e.stdout}\", file=sys.stderr)\n    print(f\"STDERR:\\n{e.stderr}\", file=sys.stderr)\nfinally:\n    # Always try to clean up\n    if os.path.basename(os.getcwd()) == project_name:\n        os.chdir(\"..\")\n    if os.path.exists(project_name):\n        print(f\"\\nCleaning up project directory '{project_name}'...\")\n        subprocess.run([\"rm\", \"-rf\", project_name], check=True)","lang":"python","description":"This quickstart demonstrates the typical workflow for deploying a Reflex application using the `reflex-hosting-cli`. It initializes a new Reflex project, then attempts to deploy it. Note that `rx-host login` needs to be run interactively to authenticate with the Reflex hosting service before deployment, or environment variables must be configured.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":{"tag":null,"tag_description":null,"last_tested":"2026-05-17","installed_version":"0.1.45","pypi_latest":"0.1.64","is_stale":true,"summary":{"python_range":"3.10–3.9","success_rate":100,"avg_install_s":3.5,"avg_import_s":null,"wheel_type":"wheel"},"results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"reflex-hosting-cli","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"36.5M"},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"reflex-hosting-cli","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":3.3,"import_time_s":null,"mem_mb":null,"disk_size":"37M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"reflex-hosting-cli","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"40.3M"},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"reflex-hosting-cli","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":3.4,"import_time_s":null,"mem_mb":null,"disk_size":"41M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"reflex-hosting-cli","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"31.8M"},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"reflex-hosting-cli","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":3.3,"import_time_s":null,"mem_mb":null,"disk_size":"32M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"reflex-hosting-cli","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"31.2M"},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"reflex-hosting-cli","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":3.2,"import_time_s":null,"mem_mb":null,"disk_size":"32M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"reflex-hosting-cli","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"37.7M"},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"reflex-hosting-cli","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":4.1,"import_time_s":null,"mem_mb":null,"disk_size":"39M"}]}}