Skip to content

Commit

Permalink
Merge pull request #17 from nifcloud/feature/more_friendly_usage
Browse files Browse the repository at this point in the history
Add more usage contents in README
  • Loading branch information
tily authored Dec 28, 2022
2 parents 954babe + 62a012d commit 29fcbe5
Showing 1 changed file with 44 additions and 5 deletions.
49 changes: 44 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,22 +35,61 @@ $ docker run -it --rm ghcr.io/nifcloud/nifcloud-cli --version
## Usage
### Set credentials
You can configure credentials via environment variables or `nifcloud configure` command.
#### via environment variable
- Linux
```
## Set credentials and default region
$ export NIFCLOUD_ACCESS_KEY_ID=<Your NIFCLOUD Access Key ID>
$ export NIFCLOUD_SECRET_ACCESS_KEY=<Your NIFCLOUD Secret Access Key>
$ export NIFCLOUD_DEFAULT_REGION=jp-east-1
```
- Windows
```
C:\> set NIFCLOUD_ACCESS_KEY_ID=<Your NIFCLOUD Access Key ID>
C:\> set NIFCLOUD_SECRET_ACCESS_KEY=<Your NIFCLOUD Secret Access Key>
C:\> set NIFCLOUD_DEFAULT_REGION=jp-east-1
```
#### via `nifcloud configure` command
```
$ nifcloud configure
NIFCLOUD Access Key ID [None]: <Your NIFCLOUD Access Key ID>
NIFCLOUD Secret Access Key [None]: <Your NIFCLOUD Secret Access Key>
Default region name [jp-east-1]: jp-east-1
Default output format [None]:
```
## Show available services
config file is saved under the `.nifcloud` directory in your home directory (`$HOME` or `%UserProfile%`)
### Show available services
```
$ nifcloud help
```
### Show available actions for the service
## Show available actions for the service
```
$ nifcloud computing help
```
### Show available parameters for the action
## Show available parameters for the action
```
$ nifcloud computing create-key-pair help
```
### Run the command actually
## Run the command actually
```
$ nifcloud computing create-key-pair --key-name foobar123 --password foobar123
```
Expand Down

0 comments on commit 29fcbe5

Please sign in to comment.