Skip to content

optim-corp/cios-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CIOS CLI - OPTiM Cloud IoT OS CLI

About

OPTiM Cloud IoT OS(CIOS) The command line interface (CLI) is an integrated tool for managing CIOS. This tool will be provided in binary and will help automation with scripts etc. that operate CIOS.

This repository depends on OPTiM Cloud IoT OS Golang SDK.

Use API as of 2021/03/10.

CIOS CLI Reference

CIOS CLI Document

Inisilized

0. CLI Download

1. Create config file

The configuration file is automatically generated by entering the following command. Information such as domain county and Access Token is temporarily stored in the configuration file.

$ cios
Created a directory [C:\Users\hogehoge/.cios-cli]
Created a file [C:\Users\hogehoge/.cios-cli/config.json]
Created a file [C:\Users\hogehoge/.cios-cli/URL.json]

Next '$ cios login'

2. Get API token

By doing cios login, you can log in with any OAuth Client. Create OAuthClient information according to the following.

  • Type: Web
  • Redirect URI: http://localhost:8080/oauth2/callback
$ cios login 
? Choose a stage:  [Use arrows to move, enter to select, type to filter]
> Preview
  Production
? Redirect URI:  http://localhost:8080/oauth2/callback
? Client ID:  hohohooho-gege-hoho-gegehogehogehoge
? Client Secret ****************************************************************

...

finish

3. Use CIOS API

The CIOS CLI Document describes how to use the API.

4. Save config files

By saving the setting information as a file, any data can be recalled later.

For example, it is effective when using two environments, Prod and Pre.

$ cios config save
? Name:  Develop                                        
Success to save config

Custom API FQDNs

You can change the destination environment by entering the following command.

cios url edit
  • Option -i : The entered domain will be set.
  • Option -ia : Write all URLs.
  • Option none : The settings folder opens.

How to Development

Please see DEVELOP.md

How to Support

If you have any issues or questions, please raise them on Github issues.

LICENSE

The Apache-2.0 License

Copyright (c) 2021 OPTiM Corporation https://www.optim.co.jp/