|
1 | | -# cloudcli-server |
| 1 | +# cloudcli |
| 2 | + |
| 3 | +Terminal-based CLI interface for server and infrastructure management using supported APIs |
| 4 | + |
| 5 | +## Install |
| 6 | + |
| 7 | +Download binary for your OS/architecture from the [Releases](https://github.com/cloudwm/cloudcli/releases) page |
| 8 | + |
| 9 | +``` |
| 10 | +sudo wget -O /usr/local/bin/cloudcli https://github.com/cloudwm/cloudcli/releases/download/v0.0.1/cloudcli-linux-amd64 &&\ |
| 11 | +sudo chmod +x /usr/local/bin/cloudcli |
| 12 | +``` |
| 13 | + |
| 14 | +## Usage |
| 15 | + |
| 16 | +Set server API host and credentials using one of the following options: |
| 17 | + |
| 18 | +* **yaml configuration file**: |
| 19 | + * A configuration file can set CLI flags |
| 20 | + * By default, a file is searched for at `$HOME/.cloudcli.yaml` |
| 21 | + * A different location can be specified using env var `CLOUDCLI_CONFIG=""` or `--config` flag |
| 22 | + * See [example-cloudcli.yaml](/example-cloudcli.yaml) |
| 23 | + |
| 24 | +* **environment variables**: |
| 25 | + * Environment variables prefixed with `CLOUDCLI_` can set CLI flags |
| 26 | + * See [example-cloudcli.env](/example-cloudcli.env) |
| 27 | + |
| 28 | +* **CLI flags**: |
| 29 | + * Server host and credentials can also be set using flags: |
| 30 | + * `cloudcli --api-server "" --api-clientid "" --api-secret ""` |
| 31 | + |
| 32 | +**Important** Please keep your server and API credentials secure, |
| 33 | +it's recommended to use a configuration file with appropriate permissions and location. |
| 34 | + |
| 35 | + |
| 36 | +## Commands |
| 37 | + |
| 38 | +Following is an overview of main supported commands. |
| 39 | + |
| 40 | +See the cloudcli command help messages for full reference. |
| 41 | + |
| 42 | +``` |
| 43 | +cloudcli --help |
| 44 | +``` |
| 45 | + |
| 46 | + |
| 47 | +### Server commands |
| 48 | + |
| 49 | + |
| 50 | +#### `cloudcli server list` |
| 51 | + |
| 52 | +List all the servers in the account |
| 53 | + |
| 54 | + |
| 55 | +#### `cloudcli server options` |
| 56 | + |
| 57 | +Download and show the available server options for your account. |
| 58 | + |
| 59 | +One of the following flags must be provided: |
| 60 | + |
| 61 | +``` |
| 62 | + --billing show billing resources |
| 63 | + --cpu show cpu resources |
| 64 | + --datacenter show datacenter resources |
| 65 | + --disk show disk resources |
| 66 | + --image show image resources |
| 67 | + --network show network resources |
| 68 | + --ram show ram resources |
| 69 | + --traffic show traffic resources |
| 70 | +``` |
| 71 | + |
| 72 | +If optional flag `--cache` is provided, the options will be downloaded to local file `cloudcli-server-options.json` and loaded from that file if it exists. |
| 73 | + |
| 74 | + |
| 75 | +### Work in progress / Experiemental / Unstable commands |
| 76 | + |
| 77 | +Following commands are work in progress / experiemental / unstable |
| 78 | + |
| 79 | +To enable them set environment variable `CLOUDCLI_ENABLE_ALPHA=1` |
| 80 | + |
| 81 | +##### `cloudcli server create` |
| 82 | + |
| 83 | +Create server |
| 84 | + |
| 85 | +**Work In Progress** |
0 commit comments