Reflex Tools are the combination of CLI commands available to interface with the Reflex Engine. You can run them either with the reflexsc/tools container, or by doing a Direct Install.
All commands center around reflex as a base command, but some of them also may be run individually as a sub command. Watch for these shortcuts.
The commands are self-describing (run without arguments for syntax information).
Command Usage
In the command syntaxes shown below, anything after a question mark is optional, and the pipe | character shows alternate options.
General Setup
Reflex tools supports a few settings in a local config file (encrypted), if you would rather do this than use environment, it can ease common use. This is not recommended for production use — although the local config is encrypted, it is not a strong security.
The available setup options:
Api Key Management
The apikey, although also available to manipulate with the direct reflex engine command, may be more directly managed with this command.
Launch Control
This is used to launch a service — either within a container, or even from SystemD. You may use reflex launch {args} or launch {args}. If [service-name] is not provided as an argument, it is sought as an environment variable REFLEX_SERVICE.
In the case of launch config, it does not manipulate any local files, unless you include --commit.
Reflex Actions
Reflex Actions are a way to localize commonly run commands or steps, for any number of purposes. They are grouped into a single configuration file for easy management. Full details are available in the section Reflex Actions.
Configure an Application
An easy templating process to build out a new application, this command will fill in the Pipeline, Service and Configuration objects with boilerplate settings.
Reflex Engine
This command is used to directly manipulate objects in the Reflex Engine. Full details on these objects are available in the Reflex Objects section of the manual.
You may use any of the commands:
A more indepth breakdown:
From Container
To run from a container, try the following (Make sure you have REFLEX_URL and REFLEX_APIKEY set in your environment)
Or if you are in bash, you can simiplify this by making ‘reflex’ a function that calls docker:
Using the SDK
There is also a software level you can easily use, in Python, with the Reflex SDK.