> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nebius.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How to install the Nebius AI Cloud CLI

Nebius AI Cloud provides a unified *command-line interface* (CLI) for automating your resource management. It helps you efficiently handle repetitive tasks and scale workloads directly from the terminal.

## Steps

### Install the Nebius AI Cloud CLI

The Nebius AI Cloud CLI is available for both Ubuntu and macOS.

1. Open your terminal and run the command:

   ```bash theme={null}
   curl -sSL https://artifacts.nebius.cloud/cli/install.sh | bash
   ```

2. Restart your terminal or run `exec -l $SHELL` to complete the installation.

3. Make sure that the installation is successful:

   ```bash theme={null}
   nebius version
   ```

   In the output, you'll see the version of your Nebius AI Cloud CLI.

### Configure the Nebius AI Cloud CLI

After installation, configure a profile for the CLI. Use one of the supported account types:

* A *user account* to manage resources from your side, as a human user.
* A *service account* to authenticate resources and automate interaction with applications.

The steps below describe how to configure the CLI with your user account. If you want to work with a service account, see [How to set up the CLI for a service account](/cli/configure#how-to-set-up-the-cli-for-a-service-account).

<Warning>
  **Use one profile per project**

  Create a separate Nebius AI Cloud CLI profile for each project to ensure correct [region](/overview/regions)-specific configuration.
</Warning>

Choose the non-interactive flow to specify the configuration parameters in advance, or the interactive flow to enter them step by step.

<Tabs>
  <Tab title="Non-interactive flow">
    1. Create a name for the new profile in the Nebius AI Cloud CLI and save it to an environment variable:

       ```bash theme={null}
       export PROFILE_NAME=<new_profile_name>
       ```

    2. [Get the project ID](/iam/manage-projects#cli-3) and save it to an environment variable:

       ```bash theme={null}
       export PROJECT_ID=<project_ID>
       ```

    3. Create the CLI profile:

       ```bash theme={null}
       nebius profile create \
         --profile $PROFILE_NAME \
         --endpoint api.nebius.cloud \
         --federation-endpoint auth.nebius.com \
         --parent-id $PROJECT_ID
       ```

       If you have access to multiple tenants, you can specify the tenant that you want to use with this profile in the `--tenant-id` parameter.

       If you are added to someone else's [tenant](/iam/overview#tenants) and know the ID of its [federation](/iam/overview#federations), you can specify it either in the `--federation-id` parameter, or when logging in to the Nebius AI Cloud web console after running the command.

    4. On the browser tab that opens, log in to the web console if prompted. After logging in (or if you have already been logged in), you will see the following message:

       ```plaintext theme={null}
       Login is successful, you may close the browser tab and go to the console
       ```

    5. Close the browser tab and go back to your terminal window.

       Example output:

       ```plaintext theme={null}
       profile "<profile_name>" configured and activated
       ```

    6. Check that your new profile has been created and set as the default one:

       ```bash theme={null}
       nebius profile list
       ```

       Example output:

       ```plaintext theme={null}
       ...
       <profile_name> [default]
       ```
  </Tab>

  <Tab title="Interactive flow">
    1. Create a CLI profile:

       ```bash theme={null}
       nebius profile create
       ```

    2. Set up the new profile:

       1. Specify the profile name and press `Enter`.

       2. Keep the default value for **Set api endpoint** (`api.nebius.cloud`) and press `Enter`.

       3. Under **Select authorization type**, keep `federation` and press `Enter`.

       4. Keep the default value for **Set federation endpoint** (`auth.nebius.com`) and press `Enter`.

       5. On the browser tab that opens, log in to the Nebius AI Cloud web console if prompted. After logging in (or if you have already been logged in), you will see the following message:

          ```plaintext theme={null}
          Login is successful, you may close the browser tab and go to the console
          ```

       6. Close the browser tab and go back to your terminal window.

       7. If you have access to multiple tenants, choose the tenant that you want to use with this profile. If you only have access to one tenant, it is selected by default.

       8. Choose the project that you want to use as the default for this profile.

          Example output:

          ```plaintext theme={null}
          profile "<profile_name>" configured and activated
          ```

    3. Check that your new profile has been created and set as the default one:

       ```bash theme={null}
       nebius profile list
       ```

       Example output:

       ```plaintext theme={null}
       ...
       <profile_name> [default]
       ```
  </Tab>
</Tabs>

### (Optional) Set up command autocompletion

During setup, your shell will enable Nebius AI Cloud CLI autocompletion by default. If it doesn't happen, use one of the solutions below:

<Tabs>
  <Tab title="Permanent solution">
    Run the following command:

    ```bash theme={null}
    nebius completion zsh > ~/.nebius/completion.zsh.inc
    echo 'if [ -f '~/.nebius/completion.zsh.inc' ]; then source '~/.nebius/completion.zsh.inc'; fi' >> ~/.zshrc
    ```
  </Tab>

  <Tab title="Single-session solution">
    The command below will generate a new completion file each time you create a new session. The example below is for Zsh:

    ```bash theme={null}
    echo 'source <(nebius completion zsh)' >> ~/.zshrc
    ```
  </Tab>
</Tabs>

## What's next

Create your first resources by using the Nebius AI Cloud CLI, for example:

* [Compute virtual machine](/compute/quickstart)
* [Managed Service for Kubernetes® cluster](/kubernetes/quickstart)
* [Object Storage bucket](/object-storage/quickstart)
