Skip to content

Commit 657e8d2

Browse files
authored
Merge pull request #9 from ovh/readme-improvements
Readme improvements
2 parents 07b91de + 36dfcbf commit 657e8d2

1 file changed

Lines changed: 64 additions & 54 deletions

File tree

README.md

Lines changed: 64 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -11,50 +11,32 @@
1111
# Table of Contents
1212

1313
- [Installation](#installation)
14-
- [Build](#build)
1514
- [Usage](#usage)
16-
- [Login](#login)
17-
- [Configuration](#configuration)
18-
- [Generate Shell Completion](#generate-shell-completion)
15+
- [Authenticating the CLI](#authenticating-the-cli)
1916
- [Examples](#examples)
20-
- [Get the sources](#get-the-sources)
17+
- [Generate Shell Completion](#generate-shell-completion)
18+
- [Contributing](#contributing)
19+
- [Build](#build)
2120
- [Run the tests](#run-the-tests)
21+
- [Our awesome contributors](#our-awesome-contributors)
2222
- [Related links](#related-links)
2323

2424
# Installation
2525

2626
1. Download [latest release](https://github.com/ovh/ovhcloud-cli/releases/latest)
2727
2. Untar / unzip the archive
2828
3. Add the containing folder to your `PATH` environment variable
29-
4. Check the [CLI documentation](./doc/ovhcloud.md)
3029

31-
# Build
30+
# Usage
3231

3332
```bash
34-
# Build the OVHcloud cli
35-
$ make build
36-
37-
# Cross-compile for other targets in ./dist
38-
$ make release-snapshot
39-
40-
# Optionally, you can compile a WASM binary
41-
$ make wasm
33+
$ ovhcloud [command] {subcommands} {parameters/flags}
4234
```
4335

44-
# Usage
45-
46-
Checkout the [full documentation](./doc/ovhcloud.md)
47-
48-
Invoke the binary `ovhcloud[.exe]` or run `go run ./cmd/ovhcloud`.
36+
Checkout the [full documentation](./doc/ovhcloud.md).
4937

38+
Available commands:
5039
```
51-
$ ovhcloud --help
52-
CLI to manage your OVHcloud services
53-
54-
Usage:
55-
ovhcloud [command]
56-
57-
Available Commands:
5840
account Manage your account
5941
alldom Retrieve information and manage your AllDom services
6042
baremetal Retrieve information and manage your baremetal services
@@ -100,29 +82,27 @@ Available Commands:
10082
vrackservices Retrieve information and manage your vRackServices services
10183
webhosting Retrieve information and manage your WebHosting services
10284
xdsl Retrieve information and manage your XDSL services
85+
```
86+
87+
Global options:
10388

104-
Flags:
89+
```
10590
-d, --debug Activate debug mode (will log all HTTP requests details)
10691
-f, --format string Output value according to given format (expression using gval format)
10792
-h, --help help for ovhcloud
10893
-e, --ignore-errors Ignore errors in API calls when it is not fatal to the execution
10994
-i, --interactive Interactive output
11095
-j, --json Output in JSON
11196
-y, --yaml Output in YAML
112-
113-
Use "ovhcloud [command] --help" for more information about a command.
11497
```
11598

116-
## Login
99+
## Authenticating the CLI
117100

118-
```bash
119-
# Log in and create API credentials (interactive)
120-
$ ovhcloud login
121-
```
101+
OVHcloud CLI requires authentication to be able to make API calls. There are several ways to define your credentials.
122102

123-
Check out the [authentication page](./doc/authentication.md) for further information about the authentication means.
103+
Check out the [authentication page](./doc/authentication.md) for further information about the configuration and the authentication means.
124104

125-
## Configuration
105+
* Using a configuration file:
126106

127107
Default settings can be set using a configuration file named `.ovh.conf` and located in your `${HOME}` directory.
128108

@@ -140,20 +120,21 @@ client_secret = <OAuth 2.0 client secret>
140120
default_cloud_project = <public cloud project ID>
141121
```
142122

143-
## Generate Shell Completion
123+
* Using environment variables:
144124

145125
```bash
146-
# Bash
147-
eval "$(./ovhcloud completion bash)"
148-
# Zsh
149-
eval "$(./ovhcloud completion zsh)"
150-
# Fish
151-
./ovhcloud completion fish | source
152-
# PowerShell
153-
./ovhcloud completion powershell | Out-String | Invoke-Expression
126+
OVH_ENDPOINT=ovh-eu
127+
OVH_APPLICATION_KEY=xxx
128+
OVH_APPLICATION_SECRET=xxx
129+
OVH_CONSUMER_KEY=xxx
130+
OVH_CLOUD_PROJECT_SERVICE=<public cloud project ID>
154131
```
155132

156-
Add the appropriate line to your shell’s startup file (`~/.bashrc`, `~/.zshrc`, etc.) to enable persistent autocompletion.
133+
* Interactive login:
134+
```bash
135+
# Log in and create API credentials (interactive)
136+
ovhcloud login
137+
```
157138

158139
## Examples
159140

@@ -164,24 +145,53 @@ Add the appropriate line to your shell’s startup file (`~/.bashrc`, `~/.zshrc`
164145
| Fetch details of a single VPS in JSON | `ovhcloud vps get <service_id> --json` |
165146
| Reinstall a baremetal interactively | `ovhcloud baremetal reinstall <id> --editor` |
166147

167-
# Get the sources
148+
# Generate Shell Completion
168149

169150
```bash
170-
$ git clone https://github.com/ovh/ovhcloud-cli.git
151+
# Bash
152+
eval "$(./ovhcloud completion bash)"
153+
# Zsh
154+
eval "$(./ovhcloud completion zsh)"
155+
# Fish
156+
./ovhcloud completion fish | source
157+
# PowerShell
158+
./ovhcloud completion powershell | Out-String | Invoke-Expression
171159
```
172-
173-
You've developed a new cool feature? Fixed an annoying bug? We'd be happy to hear from you!
160+
161+
Add the appropriate line to your shell’s startup file (`~/.bashrc`, `~/.zshrc`, etc.) to enable persistent autocompletion.
162+
163+
# Contributing
164+
165+
You've developed a new cool feature? Fixed an annoying bug? We'd be happy to hear from you, there are no small contributions!
174166

175167
Have a look in [CONTRIBUTING.md](https://github.com/ovh/ovhcloud-cli/blob/master/CONTRIBUTING.md)
176168

169+
## Build
170+
171+
```bash
172+
# Build the OVHcloud cli
173+
make build
174+
175+
# Cross-compile for other targets in ./dist
176+
make release-snapshot
177+
178+
# Optionally, you can compile a WASM binary
179+
make wasm
180+
```
181+
177182
## Run the tests
178183

179184
```bash
180-
$ make test
185+
make test
181186
```
182187

188+
## Our awesome contributors
189+
190+
<a href="https://github.com/ovh/ovhcloud-cli/graphs/contributors">
191+
<img src="https://contrib.rocks/image?repo=ovh/ovhcloud-cli" />
192+
</a>
193+
183194
# Related links
184195

185-
* Contribute: https://github.com/ovh/ovhcloud-cli/blob/master/CONTRIBUTING.md
186196
* Report bugs: https://github.com/ovh/ovhcloud-cli/issues
187-
* Get latest version: https://github.com/ovh/ovhcloud-cli/releases/latest
197+
* Get latest version: https://github.com/ovh/ovhcloud-cli/releases/latest

0 commit comments

Comments
 (0)