From 62a012d8059201424082049843df58d10bb27ae9 Mon Sep 17 00:00:00 2001 From: aokumasan Date: Thu, 22 Dec 2022 18:32:55 +0900 Subject: [PATCH] Add more usage contents in README --- README.md | 49 ++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 44 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 2151d44..7da07cb 100644 --- a/README.md +++ b/README.md @@ -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= $ export NIFCLOUD_SECRET_ACCESS_KEY= $ export NIFCLOUD_DEFAULT_REGION=jp-east-1 +``` + +- Windows + +``` +C:\> set NIFCLOUD_ACCESS_KEY_ID= +C:\> set NIFCLOUD_SECRET_ACCESS_KEY= +C:\> set NIFCLOUD_DEFAULT_REGION=jp-east-1 +``` + +#### via `nifcloud configure` command + +``` +$ nifcloud configure +NIFCLOUD Access Key ID [None]: +NIFCLOUD Secret Access Key [None]: +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 ```