> For the complete documentation index, see [llms.txt](https://docs.nuvolos.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nuvolos.com/reference/nuvolos-cli-and-python-api/using-the-cli.md).

# Using the CLI

## Display help

Show available commands:

{% code overflow="wrap" %}

```
nuvolos --help
```

{% endcode %}

## Slugs and identifiers

Nuvolos objects (organisations, Spaces, Instances, Applications) are identified by slugs in the CLI — normalised representations of their names. Slugs are unique within their level:

* Organisation slugs are globally unique.
* Space slugs are unique within an organisation.
* Instance slugs are unique within a Space.
* Application slugs are unique within an Instance.

{% hint style="info" %}
All `nuvolos ... list` commands accept the `--format` flag to format the output in `json` or `yaml:`
{% endhint %}

### List organisations

{% code overflow="wrap" %}

```sql
nuvolos orgs list
```

{% endcode %}

Lists the organisations you are affiliated with.

### List Spaces

{% code overflow="wrap" %}

```sql
nuvolos spaces list
```

{% endcode %}

Lists Spaces in the current organisation. On a local machine or to query a different organisation, use `--org <org_slug>:`

{% code overflow="wrap" %}

```sql
nuvolos spaces list --org <org_slug>
```

{% endcode %}

### List running Nuvolos applications

To list the applications you have started and are currently running in Nuvolos, use the `nuvolos apps running` command.

This command will also display the status of apps (STARTING, RUNNING, STOPPING) and the current CPU and memory usage of apps.

You can filter the list of running applications for a given org/space/instance or application by specifying additional flags to the command:

<figure><img src="/files/Ae9HzUtyMYtDbw7qyHpK" alt=""><figcaption></figcaption></figure>

### List Nuvolos applications

To list the Nuvolos applications in the current Nuvolos instance you are working on, run the `nuvolos apps list` command.

{% hint style="info" %}
If you are using the CLI on your computer or you want to list the applications in another Nuvolos organization/space/instance, you need to specify the slugs of the organization/space/instance in the command:\
\
`nuvolos apps list --org <org_slug> --space <space_slug> --instance <instance_slug>`
{% endhint %}

## Start an application

First, get the slug of the application you wish to run with the `nuvolos apps list` command, then start the application with the `nuvolos apps start <app_slug>` command.

{% hint style="info" %}
If you want the command to wait until the application has starte&#x64;**,** you should specify the `--wait` flag:
{% endhint %}

This behavior is particularly useful when running a "Start app" -> "Execute command" -> "Stop app" pipeline, as you can be sure that the application will be ready to execute commands when the `nuvolos app start <app_slug> --wait` command returns.

### Starting an application with a different size

You can start a Nuvolos application from the API in a different size, without needing to reconfigure it. First, you need to identify the node\_pool slug for the credit-based resource size you want to use.

You can get the list of available credit based-sizes, also termed **node pools** with command:

{% code overflow="wrap" %}

```sql
nuvolos apps nodepools
```

{% endcode %}

Then start with the chosen node pool:

{% code overflow="wrap" %}

```sql
nuvolos apps start <app_slug> --node-pool="<slug>" --wait
```

{% endcode %}

{% hint style="info" %}
**Running apps on credit-based resource sizes consumes Credits.** Please check if your Nuvolos space is configured to run credit-based workloads.
{% endhint %}

## Executing a command in an application

You can run a command in a running Nuvolos application as if you had a `bash` terminal opened in the given application. This lets you create an automated workflow to execute a workload on Nuvolos. You do this by automatically starting a pre-configured application, running a program in the application, and then stopping the application when the command finishes.

To submit a command for execution, use:

{% code overflow="wrap" %}

```sql
nuvolos apps execute --app <app_slug> 'YOUR COMMAND'
```

{% endcode %}

{% hint style="info" %}
**Currently, not all Nuvolos application types support running commands**. JupyterLab, VSCode (except for the versions with Airflow), Spyder, Terminal and newer RSudio apps support command execution only.

To list these applications, select the `api_command_run:enabled` tag on the[ Add new application](broken://pages/JqeO9qoUHXqm4ZhBgpXY) screen.
{% endhint %}

### Output and logs of executed commands

Upon every command execution, a new folder is created in the selected application's instance under the `/files/nuvolos_api_out` folder in a `<timestamp>_<request_id>` format, where the request ID (`reqid`) is returned by the CLI command. A `metadata.json` file is created to store details such as the application context, submission timestamp, and the submitted command.

By default, the standard output and the standard error of your command are redirected to separate files to ensure preservation. The files are located in the folder introduced above, called `output.log` and `error.log`, respectively.

{% hint style="info" %}
`nuvolos apps execute` supports default an output redirect when exactly one command is submitted. If you submitted a command sequence (e.g. `python prepare.py && python evaluate.py`), you need to specify the files where you intend to redirect the `stdout` and `stderr` of each command. Otherwise, the results of the commands without specifications will be saved in the default location.
{% endhint %}

## Stop an application

You can stop a running Nuvolos application with the command:

{% code overflow="wrap" %}

```sql
nuvolos apps stop --app <app_slug>:
```

{% endcode %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.nuvolos.com/reference/nuvolos-cli-and-python-api/using-the-cli.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
