Installing and Configuring OSC CLI

You can manage your resources on the OUTSCALE Cloud using OSC CLI, a command-line interface (CLI) developed by 3DS OUTSCALE.

OSC CLI is compatible with the OUTSCALE API and all our AWS-compliant APIs.

You can also use Cockpit or AWS CLI. For more information, see About Cockpit and Installing and Configuring AWS CLI.

Installing OSC CLI

Installing OSC CLI on Linux

Before you begin: Make sure Python 3.6 or later and pip are installed on your machine.

  1. (optional) It is recommended to install OSC CLI and its dependencies in a Python virtual environment (virtualenv) rather than directly on your system. To create a virtualenv, run the following commands:

    $ python3 -m venv .venv
    $ source .venv/bin/activate
  2. To install OSC CLI from the PyPI package, run the following command:

    $ pip install osc-sdk

    To exit the virtualenv, type deactivate in your terminal.

Installing OSC CLI on macOS

Before you begin: Install Homebrew on your machine.

  1. To install OSC CLI from the Homebrew package, run the following command in your terminal:

    $ brew install osc-cli
  2. Update the PATH environment variable of your terminal using the following command (replace FIRSTNAME.LASTNAME with the appropriate value, and 3.9 with your Python version number):

    $ export PATH=$PATH:/Users/FIRSTNAME.LASTNAME/Library/Python/3.9/bin/

Installing OSC CLI on Windows

  1. Install Python 3 on your machine:

    1. Download and launch the latest Python installer.

    2. Check the Add Python 3.x to PATH box.

    3. Click Install Now.

    4. Click Disable path length limit.

  2. In a command prompt, type the following commands:

    $ pip install --upgrade pip
    $ pip install osc-sdk

    OSC CLI is now installed.

Configuring OSC CLI

  1. In your home directory, create a directory named .osc.

  2. In .osc, create a file named config.json with the following content:

        "default": {
            "access_key": "ACCESSKEY",
            "secret_key": "SECRETKEY",
            "host": "",
            "https": true,
            "method": "POST",
            "region": "eu-west-2"
  3. If necessary, replace eu-west-2 with the Region of your account.

  4. Also replace ACCESSKEY and SECRETKEY with the access key ID and corresponding secret key of your account.

    With Cockpit v2, you can find your access key ID using the following steps:

    1. In the top right corner, click your initials.
      A drop-down menu appears.

    2. Click IconUserKey Access keys.

    If you do not have access to Cockpit v2, you can get your access key ID and corresponding secret key using the following steps:

    1. Save the above file.

    2. Run the following command while replacing EMAIL and PASSWORD with the email and password of your OUTSCALE account:

      $ osc-cli icu ListAccessKeys --authentication-method "password" --login "EMAIL" --password "PASSWORD"

    For security reasons, on Cockpit v2, the secret key is only available when creating the access key.

    You can now execute API calls using OSC CLI.

    For more advanced configuration options, see the OSC CLI GitHub repository.


To send a request using OSC CLI, specify in your command:

  • One of the supported APIs (api for the OUTSCALE API, or fcu, lbu, eim, icu or directlink).

  • The call you request.

  • Any other attribute required by the command.

Request sample
$ osc-cli api CreateVolume \
   --SubregionName eu-west-2a \
   --Size 10

If you want to specify a number as a string instead of as an integer, you must wrap it in two pairs of quotes ('"12345678"').

Related Pages

AWS™ and Amazon Web Services™ are trademarks of Amazon Technologies, Inc or its affiliates in the United States and/or other countries.