Registry / devops / reflex-hosting-cli

reflex-hosting-cli

JSON →
library0.1.66pypypi✓ verified 87d ago

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.

pip install reflex-hosting-cli
INSTALL
IMPORT
SIG · REFLEX-HOSTING-CLI
R
reflex-hosting-cli
devopspythonv0.1.66
Install
3.5s avg
Import
—
Disk
36MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v0.1.66 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.10–3.920 runs
installs and imports cleanly · install 0.0s · import 0.000s · 36.5MB
glibc
py 3.10–3.920 runs
installs and imports cleanly · install 3.5s · import 0.000s · 37MB
36MB installed
● package 36MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

cli
✓ from reflex_cli import cli
✗ from reflex_hosting_cli.config import Config

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.

import subprocess import os import sys # This quickstart demonstrates the typical command-line flow for # deploying a Reflex application using reflex-hosting-cli. # It requires 'reflex' and 'reflex-hosting-cli' to be installed. project_name = "my_quickstart_app" # Ensure we start clean for the quickstart if os.path.exists(project_name): print(f"Removing existing project '{project_name}' for a clean start...") subprocess.run(["rm", "-rf", project_name], check=True) try: print(f"1. Initializing a new Reflex project: '{project_name}'...") # This command uses the 'reflex' CLI, a prerequisite. subprocess.run(["reflex", "init", project_name], check=True, capture_output=True, text=True) print(f" Project '{project_name}' initialized.") os.chdir(project_name) print("\n2. Logging into Reflex Hosting (requires manual interaction or pre-configured token)...") print(" Please run 'rx-host login' in your terminal and follow prompts.") print(" For this quickstart, we assume you are already logged in or will log in interactively.") # You would typically run: `subprocess.run(["rx-host", "login"], check=True)` # This is commented out as it requires interactive input. print("\n3. Deploying the Reflex project...") print(" Note: This command requires active Reflex hosting credentials.") # Using --yes to skip interactive confirmation if possible. # check=False because actual deployment success depends on external factors (account, network, etc.) # and we want the quickstart script itself to complete without error due to failed deployment. result = subprocess.run(["rx-host", "deploy", "--yes"], capture_output=True, text=True) print(" Deployment command output:") print(result.stdout) if result.stderr: print(" Deployment command errors:") print(result.stderr) print("\n Deployment command finished. Check the output above for status.") except FileNotFoundError as e: 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) print("Install with: pip install reflex reflex-hosting-cli", file=sys.stderr) except subprocess.CalledProcessError as e: print(f"\nAn error occurred during command execution: {e}", file=sys.stderr) print(f"STDOUT:\n{e.stdout}", file=sys.stderr) print(f"STDERR:\n{e.stderr}", file=sys.stderr) finally: # Always try to clean up if os.path.basename(os.getcwd()) == project_name: os.chdir("..") if os.path.exists(project_name): print(f"\nCleaning up project directory '{project_name}'...") subprocess.run(["rm", "-rf", project_name], check=True)
reflex --version
Debug
Known issues
breakingThe `reflex-hosting-cli` version must be compatible with your installed `reflex` framework version. Mismatched versions can lead to deployment failures or unexpected behavior.
fix
Always ensure both `reflex` and `reflex-hosting-cli` are updated to their latest compatible versions. Run `pip install --upgrade reflex reflex-hosting-cli`.
affects: <0.1.62 may have issues with reflex >0.4.0
gotchaAuthentication is required before deploying. You must log in to the Reflex hosting service using `rx-host login`.
fix
Before your first deployment, run `rx-host login` in your terminal and follow the prompts to authenticate your account.
affects: All versions
gotchaThe CLI is under active development, and commands, options, or behavior might change between minor 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.
affects: <1.0.0
Upgrade
Version history
0.1.66latest on PyPI · released May 22, 2026
Audit
Dependencies
reflexrequiredRequired as the core web framework whose applications are deployed by this CLI.
clickrequiredCommand-line interface toolkit.
requestsrequiredHTTP client for API interactions with the hosting service.
pyyamlrequiredUsed for configuration file parsing.
inquirerrequiredProvides interactive command-line prompts.
typerrequiredUsed for building the command-line interface.
richrequiredFor rich text and formatting in the terminal output.
Agent activity
6 hits · last 30 days
node
6
Resources
reflex-hosting-cli — pip install reflex-hosting-cli · libregistry