This guide explains how to install and configure osc-cli on a Windows system.
-
Go to the official Python website
-
Download the latest version of Python (3.x)
-
Run the installer:
- Check "Add Python 3.x to PATH"
- Select Default Installation
-
Once installation is complete:
- Click "Disable path length limit" (important for Windows compatibility)
📘 For details, see the official Python on Windows guide
-
Open Command Prompt (press
Win + R, typecmd, press Enter) -
Upgrade
pip:python -m pip install --upgrade pip
-
Install
osc-sdk(which includesosc-cli):pip install osc-sdk
-
Still in Command Prompt:
mkdir %USERPROFILE%\.osc
-
Open Windows Explorer and navigate to:
C:\Users\YOUR_USERNAME\.osc -
Download this example
config.jsonand save it in that folder:- Make sure the file is named exactly
config.json(notconfig.json.txt)
- Make sure the file is named exactly
-
Edit the file to add your
access_key,secret_key, andregion:{ "default": { "access_key": "YOUR_ACCESS_KEY", "secret_key": "YOUR_SECRET_KEY", "region": "eu-west-2" } }
-
Open a new Command Prompt window
-
Run a test command, such as:
osc-cli api ReadVolumes
If everything is correctly configured, you should see a JSON response from the Outscale API.