Command Line Interface
rasactl Documentation
rasactl is a command line interface tool (CLI) tool that deploys and manages Rasa X deployments.
Features:
deploy Rasa X / Enterprise
You can userasactlto deploy Rasa X / Enterprise on your local machine or a VM in one of the major cloud providers.upgrade Rasa X / Enterprise
Upgrade/change configuration for an existing Rasa X deployment.stop/delete/start a running Rasa X / Enterprise deployment
Manage the lifecycle of your deployment: you can stop, delete or start one of the Rasa X deployments managed byrasactl.connect a local Rasa Open Source server to Rasa X / Enterprise
You can use your local Rasa Open Source server along with Rasa X / Enterprise.rasactlwill prepare configuration for Rasa Open Source and Rasa X and run the Rasa Open Source server on your local machine.(requires kind and Rasa Open Source installed locally)
use a local Rasa project along Rasa X / Enterprise deployment
Use your local Rasa project along with Rasa X / Enterprise deployment. Therasaxctlprovides an easy way to use your local Rasa project along with Rasa X / Enterprise.This setup was previously referred to as "local mode" in older Rasa X versions.
(requireskindand Rasa X ≥1.0.0)
Note
rasactl is open-source and available in the rasactl repository. Please create an issue in this repository if you discover bugs or have suggestions for improvements.
Before you start
Below you can find several things that are good to know and keep in mind when you use rasactl.
It is possible to configure multiple deployments with rasactl. A rasactl command will always execute an operation on a single deployment. Here is the order in which rasactl determines which deployment to use:
- A
DEPLOYMENT-NAMEpassed as an argument in CLI, e.g.rasactl status deployment-name, you can use therasactl helpcommand to see usage example for a given command. rasactlchecks if a.rasactlfile exists in a current working directory. If so, the deployment defined in the file is used. This.rasactlfile is created automatically when therasactl start --projectcommand is executed.rasactlchecks if a default deployment is configured in therasactl.yamlconfiguration file, if yes, then the default deployment is used. The default deployment can be set by using therasactl config use-deploymentcommand.- If there is only one deployment, then it's used.
You can use the rasactl list command to check which deployment is used as the current one.
The rasactl delete command requires explicitly passing a DEPLOYMENT-NAME as an argument.
rasactluses the Rasa X Helm chart to deploy Rasa X / Enterprise.rasactldeploys Rasa X / Enterprise without a Rasa Open Source server. It's up to you to connect Rasa Open Source with the Rasa X / Enterprise deployment.rasactluses a Kubernetes context from the kubeconfig file, if you want to switch Kubernetes cluster you have to use kubectl or use the--kube-contextflag to switch used context.
Installation
rasactl comes as a part of the Rasa Simple Installation.
If you'd like to install rasactl manually, below you can find instructions on how to do this.
curl
Copy
$ curl -L https://github.com/RasaHQ/rasactl/releases/download/0.0.9/rasactl_0.0.9_darwin_amd64.tar.gz $ tar -zxvf rasactl_0.0.9_darwin_amd64.tar.gz $ cp rasactl_0.0.9_darwin_amd64/rasactl /usr/local/bin/
Binary downloads of rasactl can be found on the Releases page. There you can find binaries for other OS and architectures.
Global flags
Below you can find global flags that can be used with every command.
Global Flags:
--config stringconfig file (default is $HOME/.rasactl.yaml)--debugenable debug output-h, --helphelp for rasactl--kube-context stringname of the kubeconfig context to use--kubeconfig stringabsolute path to the kubeconfig file (default "$HOME/.kube/config")--verboseenable verbose output
Commands
| Command | Description |
|---|---|
add |
add existing Rasa X deployment |
auth |
manage credentials for Rasa X / Enterprise |
completion |
generate the autocompletion script for the specified shell |
config |
modify the configuration file |
connect |
connect a component to Rasa X |
delete |
delete Rasa X deployment |
enterprise |
manage Rasa Enterprise |
help |
Help about any command |
list |
list deployments |
logs |
print the logs for a container in a pod |
model |
manage models for Rasa X / Enterprise |
open |
open Rasa X in a web browser |
start |
start a Rasa X deployment |
status |
show deployment status |
stop |
stop Rasa X deployment |
upgrade |
upgrade Rasa X deployment |
rasactl add
This command adds existing Rasa X deployment to rasactl.
If you already have a Rasa X deployment that uses the Rasa X Helm chart you can add the deployment and control it via rasactl.
Usage:
rasactl add NAMESPACE [flags]
Examples:
# Add a Rasa X deployment that is deployed in the 'my-test' namespace.
$ rasactl add my-test
# Add a Rasa X deployment that is deployed in the 'my-test' namespace and
# a helm release name for the deployment is 'rasa-x-example'.
$ rasactl add my-test --rasa-x-release-name rasa-x-example
Flags:
-h, --helphelp for add--rasa-x-release-name stringa helm release name to manage (default "rasa-x")
rasactl auth
Manage credentials for Rasa X / Enterprise.
Usage:
rasactl auth [command]
Available Commands:
loginauthorizerasactlto access the Rasa X / Enterprise with user credentialslogoutremove access credentials for an account
Flags:
-h, --helphelp for auth
rasactl auth login
Log in to Rasa X / Enterprise.
auth login stores credentials in an external credentials store, such as the native keychain of the operating system.
The following external credential stores will be used:
- On macOS: Apple macOS Keychain Access
- On Linux: pass
- On Windows: Microsoft Windows Credential Manager
Usage:
rasactl auth login [DEPLOYMENT-NAME] [flags]
Examples:
# Login to the 'my-deployment' Rasa X / Enterprise deployment.
$ rasactl auth login my-deployment
# Login to Rasa X / Enterprise (login to the currently active deployment).
$ rasactl auth login
# Provide a password using STDIN.
# You can login non-interactively by using the --password-stdin flag to provide a password through STDIN.
# Using STDIN prevents the password from ending up in the shell’s history.
$ rasactl auth login --username me --password-stdin
Flags:
-h, --helphelp for login-p, --password stringpassword--password-stdinread the password from stdin-u, --username stringusername
rasactl auth logout
Removes credentials from an external credentials store, such as the native keychain of the operating system.
Usage:
rasactl auth logout [DEPLOYMENT-NAME] [flags]
Examples:
# Remove access credentials (use the currently active deployment).
$ rasactl auth logout
# Remove access credentials for the 'my-deployment' deployment.
$ rasactl auth logout my-deployment
Flags:
-h, --helphelp for logout
rasactl completion
Generate the autocompletion script for rasactl for the specified shell.
See each sub-command's help for details on how to use the generated script.
Usage:
rasactl completion [command]
Available Commands:
bashgenerate the autocompletion script for bashfishgenerate the autocompletion script for fishpowershellgenerate the autocompletion script for powershellzshgenerate the autocompletion script for zsh
Flags:
-h, --helphelp for completion
Use "rasactl completion [command] --help" for more information about a command.
rasactl config
Modify the configuration file.
Usage:
rasactl config [command]
Aliases: config, cfg, conf
Available Commands:
use-deploymentset the current-deployment in the configuration file
Flags:
--create-filecreate the configuration file if it doesn't exist-h, --helphelp for config
rasactl config use-deployment
Sets the current-deployment in the configuration file.
Usage:
rasactl config use-deployment DEPLOYMENT-NAME [flags]
Examples:
# Set the 'example' deployment as the current deployment.
$ rasactl config use-deployment example
Flags:
-h, --helphelp for use-deployment--create-filecreate the configuration file if it doesn't exist
rasactl connect
Connect a component to Rasa X.
Usage:
rasactl connect [command]
Available Commands:
rasa runRasa Open Source server and connect it to the Rasa X deployment
Flags:
-h, --helphelp for connect
rasactl connect rasa
Run a local Rasa Open Source server and connect it to a Rasa X deployment. The command prepares a configuration that's required to connect Rasa X deployment and run a local Rasa Open Source server.
Usage:
rasactl connect rasa [DEPLOYMENT-NAME] [flags]
Examples:
# Connect Rasa Open Source server to Rasa X deployment.
$ rasactl connect rasa
# Run a separate Rasa Open Source server for the Rasa X worker environment.
$ rasactl connect rasa --run-separate-worker
# Pass extra arguments to Rasa Open Source server.
$ rasactl connect rasa --extra-args="--debug"
Flags:
--extra-args stringsextra arguments for Rasa Open Source server-h, --helphelp for rasa-p, --port intport to run the Rasa Open Source server at (default 5005)--run-separate-workerruns a separate Rasa Open Source server for the worker environment
rasactl start
The start command creates a Rasa X deployment or starts a stopped deployment if a given deployment already exists.
Usage:
rasactl start [DEPLOYMENT-NAME] [flags]
Examples:
# Create a new Rasa X deployment with an autogenerated name.
$ rasactl start
# Create a Rasa X deployment with a defined name.
$ rasactl start my-deployment
Flags:
--createcreate a new deployment. If --project or --project-path is set, or there is no existing deployment, the flag is not required to create a new deployment-h, --helphelp for start-p, --projectuse the current working directory as a project directory, the flag is ignored if --project-path is used--project-path stringabsolute path to the project directory mounted in kind--rasa-x-chart-version stringa helm chart version to use--rasa-x-edge-releaseuse the latest edge release of Rasa X--rasa-x-password stringRasa X password (default "rasaxlocal")--rasa-x-password-stdinread the Rasa X password from stdin--rasa-x-release-name stringa helm release name to manage (default "rasa-x")--values-file stringabsolute path to the values file--wait-timeout durationtime to wait for Rasa X to be ready (default 10m0s)
rasactl stop
The stop command stops a running Rasa X / Enterprise deployment. The Rasa X deployment and all its components will be scaled down to 0.
Usage:
rasactl stop [DEPLOYMENT-NAME] [flags]
Examples:
# Stop a Rasa X deployment with the 'my-deployment' name.
$ rasactl stop my-deployment
# Stop a currently active Rasa X deployment.
$ rasactl stop
Flags:
-h, --helphelp for stop
rasactl delete
The delete command deletes a Rasa X / Enterprise deployment.
You can use the --prune flag to remove a namespace where Rasa X deployment is located.
Usage:
rasactl delete DEPLOYMENT-NAME [flags]
Aliases:
- delete, del
Examples:
# Delete the 'my-example' deployment.
$ rasactl delete my-example
# Prune the 'my-example' deployment, execute the command with the --prune flag deletes the whole namespace.
$ rasactl delete my-example --prune
Flags:
--forceif true, delete resources and ignore errors-h, --helphelp for delete--pruneif true, delete a namespace with a project
rasactl list
List all deployments.
Usage:
rasactl list
Example Output:
CURRENT NAME STATUS RASA PRODUCTION RASA WORKER ENTERPRISE VERSION
* hopeful-haibt Running 2.8.1 2.8.1 inactive 0.42.0
vibrant-yalow Running 2.8.1 2.8.1 inactive 0.42.0
The * in the CURRENT field indicates a deployment that is used as default. It means that every time when you execute rasactl command without defining the deployment name, the deployment marked with * is used.
A deployment is marked as CURRENT if:
- there is a
.rasactlfile that includes a deployment name in your current working directory. The file is automatically created if you run therasactl startcommand with the--projector--project-pathflag - there is only one deployment
- you set the current deployment by using the
rasactl config use-deploymentcommand
rasactl status
Show the status of a deployment.
Usage:
rasactl status [DEPLOYMENT-NAME] [flags]
Examples:
# Show status for the 'example' deployment.
$ rasactl status example
# Show status for the 'example' deployment along with details.
$ rasactl status example --details
Flags:
-d, --detailsshow detailed information, such as running pods, helm chart status-h, --helphelp for status
rasactl logs
Print the logs for a container in a pod. If the pod has only one container, the container name is optional.
Usage:
rasactl logs [DEPLOYMENT-NAME] [POD] [flags]
Examples:
# Choose a pod and show logs for it (use the currently active deployment).
$ rasactl logs
# Show logs from pod rasa-x (use the currently active deployment).
$ rasactl logs rasa-x
# Show logs from pod rasa-x for the 'my-deployment' deployment.
$ rasactl logs my-deployment rasa-x
Flags:
-c, --container stringa container name-f, --followspecify if the logs should be streamed-h, --helphelp for logs
Enterprise Management Commands
You can manage an Enterprise license via rasactl.
Usage:
rasactl enterprise [command]
Available Commands:
activateactivate an Enterprise licensedeactivatedeactivate an Enterprise license
rasactl enterprise activate
Activate an Enterprise license.
Usage:
rasactl enterprise activate [DEPLOYMENT-NAME] [flags]
Examples:
# Activate an Enterprise license (use the currently active deployment).
$ rasactl enterprise activate
# Activate an Enterprise license for the 'my-deployment' deployment.
$ rasactl enterprise activate my-deployment
Flags:
-h, --helphelp for activate-l, --license stringan Enterprise license--license-stdinread an Enterprise license from stdin
rasactl enterprise deactivate
Deactivate an Enterprise license.
Usage:
rasactl enterprise deactivate [DEPLOYMENT-NAME] [flags]
Examples:
# Deactivate an Enterprise license (use the currently active deployment).
$ rasactl enterprise deactivate
# Deactivate an Enterprise license for the 'my-deployment' deployment.
$ rasactl enterprise deactivate my-deployment
Flags:
-h, --helphelp for deactivate
Model Management Commands
You can manage models in Rasa X / Enterprise via rasactl. Below is a list of commands that help with managing models:
Usage:
rasactl help model
Available Commands:
deletedelete a model from Rasa X / Enterprisedownloaddownload a model from Rasa X / Enterpriselistlist models stored in Rasa X / Enterprisetagtag a model in Rasa X / Enterpriseuploadupload model to Rasa X / Enterprise
rasactl model delete
Delete a model from Rasa X / Enterprise.
Usage:
rasactl model delete [DEPLOYMENT-NAME] MODEL-NAME [flags]
Aliases:
- delete, del
Examples:
# Delete the 'example-model' model (use the currently active deployment).
$ rasactl model delete example-model
# Delete the 'example-model' model for the 'my-deployment' deployment.
$ rasactl model delete my-deployment example-model
Flags:
-h, --helphelp for delete
rasactl model download
Download a model from Rasa X / Enterprise to your local machine.
Usage:
rasactl model download [DEPLOYMENT-NAME] MODEL-NAME [DESTINATION] [flags]
Examples:
# Download the 'example-model' model (use the currently active deployment).
# If the destination is not defined, the model will be stored in a current working directory.
$ rasactl model download example-model
# Download the 'example-model' model for the 'my-deployment' deployment
# and store it in the /tmp directory.
$ rasactl model download my-deployment example-model /tmp/example-model.tar.gz
Flags:
-h, --helphelp for download
rasactl model list
List all models stored in Rasa X / Enterprise.
Usage:
rasactl model list [DEPLOYMENT-NAME] [flags]
Aliases:
- list, ls
Examples:
# List all models (use the currently active deployment).
$ rasactl model list
# List all models for the 'my-deployment' deployment.
$ rasactl model list my-deployment
Flags:
-h, --helphelp for list
rasactl model tag
Create a tag and assign it to a given model.
Usage:
rasactl model tag [DEPLOYMENT-NAME] MODEL-NAME TAG [flags]
Examples:
# Tag the 'my-model' model as 'production' (use the currently active deployment)
$ rasactl model tag my-model production
# Tag the 'my-model' with the 'test' tag within the 'my-deployment' deployment.
$ rasactl model tag my-deployment my-model test
Flags:
-h, --helphelp for tag
rasactl model upload
Upload a model to Rasa X / Enterprise.
Usage:
rasactl model upload [DEPLOYMENT-NAME] MODEL-FILE [flags]
Aliases:
- upload, up
Examples:
# Upload the model.tar.gz model file to Rasa X / Enterprise (use the currently active deployment).
$ rasactl model upload model.tar.gz
# Upload the model.tar.gz model file to the 'my-deployment' deployment.
$ rasactl model upload my-deployment model.tag.gz
Flags:
-h, --helphelp for upload