# Rasa X and rasactl Overview

Rasa X version 0.33.0 or higher is only compatible with Rasa Open Source 2.x. If you are on Rasa Open Source 1.x, please check the [compatibility matrix](https://legacy-docs-rasa-x.rasa.com/docs/rasa-x/changelog/compatibility-matrix) for a compatible version.

`rasactl` is a command line interface tool (CLI) for deploying and managing Rasa X / Enterprise deployments.

#### Note
`rasactl` is open-source and available in [the rasactl repository](https://github.com/RasaHQ/rasactl). Please [create an issue](https://github.com/RasaHQ/rasactl/issues/new) in this repository if you discover bugs or have suggestions for improvements.

### Features
You can use `rasactl` to:
- Deploy Rasa X / Enterprise.
- Upgrade or change the configuration of a Rasa X / Enterprise deployment.
- Manage the lifecycle of a running Rasa X / Enterprise deployment.

You can start, stop or delete any Rasa X deployments managed by rasactl.

In addition, for deployments on a KIND cluster (see [REI](https://legacy-docs-rasa-x.rasa.com/docs/rasa-x/installation-and-setup/deploy-tools/rasa-ephemeral-installer/introduction)) you can:
- Connect a local Rasa Open Source server to Rasa X / Enterprise; rasactl will prepare configuration for Rasa Open Source and Rasa X and run the Rasa Open Source server on local machine.
- Use a local Rasa project with a Rasa X / Enterprise deployment.

### 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.
2. `rasactl` checks if a .rasactl file exists in the current working directory.
3. `rasactl` checks if a default deployment is configured in the rasactl.yaml configuration file.
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.

### 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.

Here's an example of how to install rasactl using curl:

```bash
$ curl -L https://github.com/RasaHQ/rasactl/releases/download/1.0.4/rasactl_1.0.4_darwin_amd64.tar.gz --output rasactl_1.0.4_darwin_amd64.tar.gz
$ tar -zxvf rasactl_1.0.4_darwin_amd64.tar.gz
$ sudo cp rasactl_1.0.4_darwin_amd64/rasactl /usr/local/bin/
```

Binary downloads of `rasactl` can be found on [the Releases page](https://github.com/rasahq/rasactl/releases).

### Global Flags
Below you can find global flags that can be used with every command.

```bash
Global Flags:
 --config string config file (default is $HOME/.rasactl.yaml)
 --debug enable debug output
 -h, --help help for rasactl
 --kube-context string name of the kubeconfig context to use
 --kubeconfig string absolute path to the kubeconfig file (default "$HOME/.kube/config")
 --verbose enable 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 |

### rosactl add
This command adds existing Rasa X deployment to rasactl.

#### Usage:
```bash
rasactl add NAMESPACE [flags]
```

#### Examples:
```bash
# Add a Rasa X deployment that is deployed in the 'my-test' namespace.
$ rasactl add my-test
```

### rosactl auth
Manage credentials for Rasa X / Enterprise.

#### Usage:
```bash
rasactl auth [command]
```

#### Available Commands:
- login
- logout

### rosactl model
Manage models in Rasa X / Enterprise via `rasactl`. Below is a list of commands that help with managing models:

#### Usage:
```bash
rasactl model [command]
```

#### Available Commands:
- delete
- download
- list
- tag
- upload

### Conclusion
This document provides a comprehensive overview of the `rasactl` CLI for managing Rasa X and Enterprise deployments.
