CLI
The reflex
command line interface (CLI) is a tool for creating and managing Reflex apps.
To see a list of all available commands, run reflex --help
.
Init
The reflex init
command creates a new Reflex app in the current directory.
If an rxconfig.py
file already exists already, it will re-initialize the app with the latest template.
Run
The reflex run
command runs the app in the current directory.
By default it runs your app in development mode. This means that the app will automatically reload when you make changes to the code. You can also run in production mode which will create an optimized build of your app.
You can configure the mode, as well as other options through flags.
Export
You can export your app's frontend and backend to zip files using the reflex export
command.
The frontend is a compiled NextJS app, which can be deployed to a static hosting service like Github Pages or Vercel. However this is just a static build, so you will need to deploy the backend separately. See the self-hosting guide for more information.