Simple CLI client for CloudAtCost
Please install following commands in advance.
curl
(Compatibility ofcurl 7.43.0
was checked).jq
(Compatibility ofjq-1.4
was checked).column
- Fillin your API key and Login address in
cac-cli.conf
$ git clone https://github.com/greymd/cac-cli-sh.git
$ cd cac-cli-sh
$ vi cac-cli.conf
# cac-cli.conf
# Fillin your own API key and Login Address
CAC_API_KEY='ABCDEFG123456789'
CAC_LOGIN_ADDR='example@example.com'
- Edit your
.bashrc
or.zshrc
to importcac-cli.conf
$ echo ". ~/reps/cac-cli-sh/cac-cli.sh" >> ~/.zshrc
$ source ~/.zshrc
$ cac-listservers
{
"status": "ok",
"time": 1469357503,
"api": "v1",
"action": "listservers",
"data": [
{
"sid": "123456789",
...
},
...
]
}
$ cac-listtemplates
$ cac-listtasks
$ cac-resources
$ cac-powerop <ACTION> <SID>
$ cac-renameserver <NAME> <SID>
$ cac-rdns <HOSTNAME> <SID>
$ cac-console <SID>
$ cac-runmode <MODE> <SID>
$ cac-build <CPU> <RAM> <STORAGE> <OS>
$ cac-delete <SID>
$ cac-ls
$ cac-bld <NUMBER>
The scripts is available as open source under the terms of the MIT License.