-
Notifications
You must be signed in to change notification settings - Fork 378
feat: Add quick start doc of OVHcloud CLI #8404
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 2 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
b9489bb
feat: Add quick start doc of OVHcloud CLI
amstuta 9499865
Update pages/manage_and_operate/cli/cli-getting-started/guide.en-gb.md
amstuta 601d777
Update pages/manage_and_operate/cli/cli-getting-started/guide.en-gb.md
amstuta 59afd57
Proofreading & date update
benchbzh acb7aca
minor updates
benchbzh 0b19cae
minor update
benchbzh 0c5da4f
minor update
benchbzh 008d997
Add Homebrew install
amstuta b97818a
Fix typo in fr-fr doc
amstuta 2902b03
date update
benchbzh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
108 changes: 108 additions & 0 deletions
108
pages/manage_and_operate/cli/cli-getting-started/guide.en-gb.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
--- | ||
title: Getting Started with OVHcloud CLI | ||
excerpt: Find out about useful resources in order to use the official OVHcloud Command Line Interface (CLI) | ||
updated: 2025-09-16 | ||
--- | ||
|
||
## Getting Started with OVHcloud CLI | ||
|
||
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: | ||
|
||
```sh | ||
curl -fsSL https://raw.githubusercontent.com/ovh/ovhcloud-cli/main/install.sh | sh | ||
``` | ||
|
||
Alternatively, you can download the latest release from the [GitHub repository](https://github.com/ovh/ovhcloud-cli): | ||
|
||
1. Visit the [releases page](https://github.com/ovh/ovhcloud-cli/releases). | ||
Y0Coss marked this conversation as resolved.
Show resolved
Hide resolved
|
||
2. Download the binary for your operating system (Linux, macOS, or Windows). | ||
3. Unpack the archive and move the binary to a directory included in your `$PATH`. | ||
4. Verify the installation: | ||
|
||
```sh | ||
ovhcloud version | ||
``` | ||
|
||
## 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](https://github.com/ovh/ovhcloud-cli/blob/main/doc/authentication.md) for further information about the configuration and the authentication means. | ||
Y0Coss marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
* Interactive login: | ||
|
||
```sh | ||
# Log in and create API credentials (interactive) | ||
ovhcloud 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 the [following guide](/pages/manage_and_operate/api/api-getting-started-ovhcloud-api) to learn how to create API credentials. | ||
|
||
Example of configuration file: | ||
rbeuque74 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
```ini | ||
[default] | ||
endpoint = ovh-eu | ||
|
||
[ovh-eu] | ||
application_key = <application key> | ||
application_secret = <application secret> | ||
consumer_key = <consumer key> | ||
|
||
[ovh-cli] | ||
default_cloud_project = <public cloud project ID> | ||
``` | ||
|
||
* Using environment variables: | ||
|
||
```sh | ||
OVH_ENDPOINT=ovh-eu | ||
OVH_APPLICATION_KEY=xxx | ||
OVH_APPLICATION_SECRET=xxx | ||
OVH_CONSUMER_KEY=xxx | ||
OVH_CLOUD_PROJECT_SERVICE=<public cloud project ID> | ||
``` | ||
|
||
## Example Commands | ||
amstuta marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
Here are some basic commands to get started: | ||
|
||
- **List your cloud projects:** | ||
```sh | ||
ovhcloud cloud project list | ||
``` | ||
- **Show details of a specific project:** | ||
```sh | ||
ovhcloud cloud project get <PROJECT_ID> | ||
``` | ||
- **List instances in a project:** | ||
```sh | ||
ovhcloud cloud instance list --cloud-project <PROJECT_ID> | ||
rbeuque74 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
``` | ||
- **Create a new instance:** | ||
```sh | ||
ovhcloud cloud instance create --cloud-project <PROJECT_ID> --name my-instance --flavor s1-2 --image Ubuntu_20.04 | ||
scraly marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
``` | ||
|
||
> **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](https://github.com/ovh/ovhcloud-cli/blob/main/doc/ovhcloud.md). | ||
|
||
## 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. | ||
|
||
## Resources | ||
|
||
- [OVHcloud CLI GitHub Repository](https://github.com/ovh/ovhcloud-cli) | ||
- [CLI Documentation](https://github.com/ovh/ovhcli#readme) | ||
- [API Reference](https://eu.api.ovh.com/console) |
108 changes: 108 additions & 0 deletions
108
pages/manage_and_operate/cli/cli-getting-started/guide.fr-fr.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
-- | ||
title: Premiers pas avec la CLI OVHcloud | ||
excerpt: Découvrez les ressources utiles pour utiliser l’interface en ligne de commande officielle OVHcloud | ||
updated: 2025-09-16 | ||
--- | ||
|
||
## Premiers pas avec la CLI OVHcloud | ||
|
||
L’interface en ligne de commande OVHcloud (CLI) est un outil conçu pour interagir avec les services OVHcloud directement depuis votre terminal. Elle permet d’automatiser des tâches, de gérer vos ressources et d’accéder efficacement aux API OVHcloud. | ||
|
||
## Installation | ||
|
||
Pour installer la CLI OVHcloud, utilisez la commande suivante : | ||
|
||
```sh | ||
curl -fsSL https://raw.githubusercontent.com/ovh/ovhcloud-cli/main/install.sh | sh | ||
``` | ||
|
||
Vous pouvez également télécharger la dernière version depuis le [dépôt GitHub](https://github.com/ovh/ovhcloud-cli) : | ||
|
||
1. Rendez-vous sur la [page des releases](https://github.com/ovh/ovhcloud-cli/releases). | ||
2. Téléchargez le binaire correspondant à votre système d’exploitation (Linux, macOS ou Windows). | ||
3. Décompressez l’archive et déplacez le binaire dans un dossier inclus dans votre `$PATH`. | ||
4. Vérifiez l’installation : | ||
|
||
```sh | ||
ovhcloud version | ||
``` | ||
|
||
## Authentification de la CLI | ||
|
||
La CLI OVHcloud nécessite une authentification pour effectuer des appels à l’API. Plusieurs méthodes permettent de définir vos identifiants. | ||
|
||
Consultez la [page d’authentification](https://github.com/ovh/ovhcloud-cli/blob/main/doc/authentication.md) pour plus d’informations sur la configuration et les moyens d’authentification. | ||
|
||
* Connexion interactive : | ||
|
||
```sh | ||
# Permet de se connecter et créer des identifiants API (mode interactif) | ||
ovhcloud login | ||
``` | ||
|
||
* Utilisation d’un fichier de configuration : | ||
|
||
Les paramètres par défaut peuvent être définis dans un fichier de configuration nommé `.ovh.conf` situé dans votre répertoire `${HOME}`. | ||
Vous pouvez consulter le [guide suivant](/pages/manage_and_operate/api/api-getting-started-ovhcloud-api) pour apprendre à créer des identifiants API. | ||
|
||
Exemple de fichier de configuration : | ||
|
||
```ini | ||
[default] | ||
endpoint = ovh-eu | ||
|
||
[ovh-eu] | ||
application_key = <application key> | ||
application_secret = <application secret> | ||
consumer_key = <consumer key> | ||
|
||
[ovh-cli] | ||
default_cloud_project = <ID projet public cloud> | ||
``` | ||
|
||
* Utilisation de variables d’environnement : | ||
|
||
```sh | ||
OVH_ENDPOINT=ovh-eu | ||
OVH_APPLICATION_KEY=xxx | ||
OVH_APPLICATION_SECRET=xxx | ||
OVH_CONSUMER_KEY=xxx | ||
OVH_CLOUD_PROJECT_SERVICE=<ID du projet public cloud> | ||
``` | ||
|
||
## Exemples de commandes | ||
|
||
Voici quelques commandes de base pour commencer : | ||
|
||
- **Lister vos projets cloud :** | ||
```sh | ||
ovhcloud cloud project list | ||
``` | ||
- **Afficher les détails d’un projet spécifique :** | ||
```sh | ||
ovhcloud cloud project get <PROJECT_ID> | ||
``` | ||
- **Lister les instances d’un projet :** | ||
```sh | ||
ovhcloud cloud instance list --cloud-project <PROJECT_ID> | ||
``` | ||
- **Créer une nouvelle instance :** | ||
```sh | ||
ovhcloud cloud instance create --cloud-project <PROJECT_ID> --name my-instance --flavor s1-2 --image Ubuntu_20.04 | ||
``` | ||
|
||
> **Remarque :** L’option `--project-id` n’est pas nécessaire si vous avez défini l'entrée `default_cloud_project` dans votre fichier de configuration, ou si la variable d’environnement `OVH_CLOUD_PROJECT_SERVICE` est renseignée. | ||
|
||
Pour plus d’informations sur les commandes disponibles, consultez la [documentation complète](https://github.com/ovh/ovhcloud-cli/blob/main/doc/ovhcloud.md). | ||
|
||
## Couverture des produits | ||
|
||
La plupart des produits proposent des commandes de base pour lister les services, récupérer et modifier leurs détails. Certains produits disposent déjà d’une couverture plus avancée, comme par exemple: Baremetal, Public Cloud (Instances, Managed Kubernetes, Rancher, Storage, Network), VPS et IAM. | ||
|
||
> **Remarque :** Les actions actuellement disponibles dans la CLI correspondent à celles proposées par l’API principale OVHcloud. Les actions spécifiques à chaque produit, accessibles via leurs propres API, ne sont pas encore couvertes, mais seront progressivement ajoutées selon le produit. | ||
|
||
## Ressources | ||
|
||
- [Dépôt GitHub OVHcloud CLI](https://github.com/ovh/ovhcloud-cli) | ||
- [Documentation CLI](https://github.com/ovhcli#readme) | ||
- [Référence API](https://eu.api.ovh.com/console) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
id: d002589a-14b2-4ceb-862e-dd2d44ac8b87 | ||
full_slug: cli-getting-started |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.