{"id":7663,"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.","status":"active","version":"0.1.62","language":"python","source_language":"en","source_url":"https://github.com/reflex-dev/reflex-hosting-cli","tags":["cli","hosting","deployment","reflex","frontend","web"],"install":[{"cmd":"pip install reflex-hosting-cli","lang":"bash","label":"Install `reflex-hosting-cli`"}],"dependencies":[{"reason":"Required as the core web framework whose applications are deployed by this CLI.","package":"reflex","optional":false},{"reason":"Command-line interface toolkit.","package":"click","optional":false},{"reason":"HTTP client for API interactions with the hosting service.","package":"requests","optional":false},{"reason":"Used for configuration file parsing.","package":"pyyaml","optional":false},{"reason":"Provides interactive command-line prompts.","package":"inquirer","optional":false},{"reason":"Used for building the command-line interface.","package":"typer","optional":false},{"reason":"For rich text and formatting in the terminal output.","package":"rich","optional":false}],"imports":[{"wrong":"from reflex_hosting_cli.config import Config","symbol":"cli","correct":"from reflex_cli import cli"}],"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."},"warnings":[{"fix":"Always ensure both `reflex` and `reflex-hosting-cli` are updated to their latest compatible versions. Run `pip install --upgrade reflex reflex-hosting-cli`.","message":"The `reflex-hosting-cli` version must be compatible with your installed `reflex` framework version. Mismatched versions can lead to deployment failures or unexpected behavior.","severity":"breaking","affected_versions":"<0.1.62 may have issues with reflex >0.4.0"},{"fix":"Before your first deployment, run `rx-host login` in your terminal and follow the prompts to authenticate your account.","message":"Authentication is required before deploying. You must log in to the Reflex hosting service using `rx-host login`.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Always refer to the official Reflex documentation and the `rx-host --help` output for the most up-to-date command usage. Test deployments in a staging environment if possible.","message":"The CLI is under active development, and commands, options, or behavior might change between minor versions.","severity":"gotcha","affected_versions":"<1.0.0"}],"env_vars":null,"search_vec":"'0.1.62':47 'activ':51 'applic':24 'cli':3,8,63 'command':12,32 'command-lin':11 'core':60 'current':44 'deploy':20,40,65 'design':16 'develop':52 'eas':43 'framework':62 'frontend':67 'host':2,7,28,37,64 'interfac':14 'line':13 'log':34 'often':53 'platform':38 'project':41 'provid':31 'receiv':54 'reflex':1,6,22,27,61,66 'reflex-hosting-c':5 'servic':29 'streamlin':18 'sync':57 'tool':15 'updat':55 'version':46 'web':23,68","created_at":"2026-04-16T14:08:02.560682+00:00","updated_at":"2026-04-16T14:08:02.560682+00:00","problems":null,"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"0.1.66","cli_name":"reflex","cli_version":"sh: 1: reflex: not found","type":"library","homepage":"https://reflex.dev","github":null,"docs":null,"changelog":null,"pypi":"https://pypi.org/project/reflex-hosting-cli/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops","web-framework"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-30","last_verified":"2026-06-30","next_check":"2026-07-30","install_tag":null}}