# Command Line Interface

## [Cheat Sheet](https://legacy-docs-v1.rasa.com/1.10.2/user-guide/command-line-interface/#id2)
The command line interface (CLI) gives you easy-to-remember commands for common tasks.

| Command                          | Effect                                                                                                          |
| -------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
| `rasa init`                      | Creates a new project with example training data, actions, and config files.                                   |
| `rasa train`                     | Trains a model using your NLU data and stories, saves trained model in `./models`.                             |
| `rasa interactive`               | Starts an interactive learning session to create new training data by chatting.                               |
| `rasa shell`                     | Loads your trained model and lets you talk to your assistant on the command line.                              |
| `rasa run`                       | Starts a Rasa server with your trained model. See the [Configuring the HTTP API](https://legacy-docs-v1.rasa.com/1.10.2/user-guide/configuring-http-api/#configuring-http-api) docs for details. |
| `rasa run actions`               | Starts an action server using the Rasa SDK.                                                                     |
| `rasa visualize`                 | Visualizes stories.                                                                                             |
| `rasa test`                      | Tests a trained Rasa model using your test NLU data and stories.                                               |
| `rasa data split nlu`           | Performs a split of your NLU data according to the specified percentages.                                       |
| `rasa data convert nlu`         | Converts NLU training data between different formats.                                                           |
| `rasa export`                    | Export conversations from a tracker store to an event broker.                                                  |
| `rasa x`                         | Launch Rasa X locally.                                                                                         |
| `rasa -h`                        | Shows all available commands.                                                                                    |

## [Create a new project](https://legacy-docs-v1.rasa.com/1.10.2/user-guide/command-line-interface/#id3)
A single command sets up a complete project for you with some example training data.

```
rasa init
```

This creates the following files:

```
.
├── __init__.py
├── actions.py
├── config.yml
├── credentials.yml
├── data
│   ├── nlu.md
│   └── stories.md
├── domain.yml
├── endpoints.yml
└── models
    └── <timestamp>.tar.gz
```

The `rasa init` command will ask you if you want to train an initial model using this data. If you answer no, the `models` directory will be empty.

## [Train a Model](https://legacy-docs-v1.rasa.com/1.10.2/user-guide/command-line-interface/#id4)
The main command is:
```
rasa train
```
This command trains a Rasa model that combines a Rasa NLU and a Rasa Core model.
If you only want to train an NLU or a Core model, you can run `rasa train nlu` or `rasa train core`.
However, Rasa will automatically skip training Core or NLU if the training data and config haven’t changed.

`rasa train` will store the trained model in the directory defined by `--out`. The name of the model is per default `<timestamp>.tar.gz`. If you want to name your model differently, you can specify the name using `--fixed-model-name`.

## [Interactive Learning](https://legacy-docs-v1.rasa.com/1.10.2/user-guide/command-line-interface/#id5)
To start an interactive learning session with your assistant, run
```
rasa interactive
```

The full list of arguments that can be set for `rasa interactive` is:
```
usage: rasa interactive [-h] [-v] [-vv] [--quiet] [--e2e] [-m MODEL]
                        [--data DATA [DATA ...]] [--skip-visualization]
                        [--conversation-id CONVERSATION_ID]
                        [--endpoints ENDPOINTS] [-c CONFIG] [-d DOMAIN]
                        [--out OUT] [--augmentation AUGMENTATION]
                        [--debug-plots] [--force] [--persist-nlu-data]
                        {core} ... [model-as-positional-argument]
```

## [Talk to your Assistant](https://legacy-docs-v1.rasa.com/1.10.2/user-guide/command-line-interface/#id6)
To start a chat session with your assistant on the command line, run:
```
rasa shell
```

## [Start a Server](https://legacy-docs-v1.rasa.com/1.10.2/user-guide/command-line-interface/#id7)
To start a server running your Rasa model, run:
```
rasa run
```

## [Start an Action Server](https://legacy-docs-v1.rasa.com/1.10.2/user-guide/command-line-interface/#id8)
To run your action server run
```
rasa run actions
```

## [Visualize your Stories](https://legacy-docs-v1.rasa.com/1.10.2/user-guide/command-line-interface/#id9)
To open a browser tab with a graph showing your stories:
```
rasa visualize
```

## [Evaluating a Model on Test Data](https://legacy-docs-v1.rasa.com/1.10.2/user-guide/command-line-interface/#id10)
To evaluate your model on test data, run:
```
rasa test
```

## [Create a Train-Test Split](https://legacy-docs-v1.rasa.com/1.10.2/user-guide/command-line-interface/#id11)
To create a split of your NLU data, run:
```
rasa data split nlu
```

## [Convert Data Between Markdown and JSON](https://legacy-docs-v1.rasa.com/1.10.2/user-guide/command-line-interface/#id12)
To convert NLU data from LUIS data format, WIT data format, Dialogflow data format, JSON, or Markdown to JSON or Markdown, run:
```
rasa data convert nlu
```

## [Export Conversations to an Event Broker](https://legacy-docs-v1.rasa.com/1.10.2/user-guide/command-line-interface/#id13)
To export events from a tracker store using an event broker, run:
```
rasa export
```

## [Start Rasa X](https://legacy-docs-v1.rasa.com/1.10.2/user-guide/command-line-interface/#id14)
Rasa X is a toolset that helps you leverage conversations to improve your assistant. You can find more information about it [here](/content/docs/rasa-x/index.html).
You can start Rasa X locally by executing
```
rasa x
```

👋 I can help you get started with Rasa and answer your technical questions.
