Getting Started with OVHcloud CLI
Objective
The OVHcloud Command Line Interface (CLI) is a tool designed to interact with OVHcloud services directly from your terminal. It allows you to automate tasks, manage resources, and access OVHcloud APIs efficiently.
Installation
To install the OVHcloud CLI, you can use the following command:
It is also possible to install OVHcloud CLI using Homebrew:
Alternatively, you can download the latest release from the GitHub repository:
- Visit the releases page.
- Download the binary for your operating system (Linux, macOS, or Windows).
- Unpack the archive and move the binary to a directory included in your
$PATH. - Verify the installation:
Authenticating the CLI
OVHcloud CLI requires authentication to be able to make API calls. There are several ways to define your credentials.
Check out the authentication page for further information about the configuration and the authentication means.
- Interactive login:
- Using a configuration file:
Default settings can be set using a configuration file named .ovh.conf and located in your ${HOME} directory.
You can check this guide to learn how to create API credentials.
Example of configuration file:
- Using environment variables:
Example Commands
Here are some basic commands to get started:
- List your cloud projects:
- Show details of a specific project:
- List instances in a project:
- Create a new instance:
Note: The --project-id option is not necessary if you defined a default_cloud_project in your configuration file, or if the OVH_CLOUD_PROJECT_SERVICE environment variable is defined.
For further information about the available commands, you can check the complete documentation.
Product Coverage
Most products offer basic commands to list services, retrieve and edit their details. Some products already have more advanced coverage, for example: Baremetal, Public Cloud (Instances, Managed Kubernetes, Rancher, Storage, Network), VPS and IAM.
Note: The actions currently available in the CLI correspond to those offered by the main OVHcloud API. Actions specific to each product, accessible via their own APIs, are not yet covered, but will gradually be added depending on the product.