Command Line Interface

rasactl Documentation

rasactl is a command line interface tool (CLI) tool that deploys and manages Rasa X deployments.

Features:

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:

  1. A DEPLOYMENT-NAME passed as an argument in CLI, e.g. rasactl status deployment-name, you can use the rasactl help command to see usage example for a given command.
  2. rasactl checks if a .rasactl file exists in a current working directory. If so, the deployment defined in the file is used. This .rasactl file is created automatically when the rasactl start --project command is executed.
  3. rasactl checks if a default deployment is configured in the rasactl.yaml configuration file, if yes, then the default deployment is used. The default deployment can be set by using the rasactl config use-deployment command.
  4. 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.

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.

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:

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:

rasactl auth

Manage credentials for Rasa X / Enterprise.

Usage:

rasactl auth [command]

Available Commands:

Flags:

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:

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:

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:

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:

Flags:

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:

Flags:

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:

rasactl connect

Connect a component to Rasa X.

Usage:

rasactl connect [command]

Available Commands:

Flags:

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:

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:

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:

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:

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:

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:

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:

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:

Enterprise Management Commands

You can manage an Enterprise license via rasactl.

Usage:

rasactl enterprise [command]

Available Commands:

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:

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:

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:

rasactl model delete

Delete a model from Rasa X / Enterprise.

Usage:

rasactl model delete [DEPLOYMENT-NAME] MODEL-NAME [flags]

Aliases:

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:

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:

rasactl model list

List all models stored in Rasa X / Enterprise.

Usage:

rasactl model list [DEPLOYMENT-NAME] [flags]

Aliases:

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:

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:

rasactl model upload

Upload a model to Rasa X / Enterprise.

Usage:

rasactl model upload [DEPLOYMENT-NAME] MODEL-FILE [flags]

Aliases:

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: