@stelladoradus/stella-cli v0.3.1
Stella CLI
This is CLI tool to help with Stelladoradus devices
Videos
TBD
Prerequsites
This CLI tool supports all multiple operating systems:
- Windows
- MacOS
- Linux
In order to run this system you must have installed NodeJS version 8 or above. You can visit site https://nodejs.org/en/download/ to download NodeJS (an LTS version is recommended). Node comes with package manager called NPM (Node Package Manager) which is automatically installed together with NodeJS.
Installation
You can install this CLI tool from the private npm package @stelladoradus/stella-cli
.
Because this is a private package, before you can install it please login to npm using the credentials provided to you:
# login with provided username & pass (type email as shown below)
$ npm login
Username: stellacollaborator
Password:
Email: (this IS public) stellacollaborator@apptentic.com
Logged in as stellacollaborator on https://registry.npmjs.org/.
# you can always check whether you're logged in or now using
$ npm whoami
stellacollaborator
To install package type:
$ npm install --global @stelladoradus/stella-cli
# The package is installed globally and should be availble for you in your command line
# Now you can run command 'stella' to see available commands and options
$ stella --help
Usage: stella [options] [command]
Options:
-V, --version output the version number
-h, --help output usage information
Commands:
shadow-set Set value for desired shadow variable (value will be automatically converted)
help [cmd] display help for [cmd]
Usage
Getting Help
You can always use --help
option to get help on how to use command.
# To get help on all subcommands and options
stella --help
# To get help on 'send-file' subcommand
stella send-file --help
Toggle band on particular device by changing setting desired shadow
# You can check for help
$ stella shadow-set --help
Usage: stella-shadow-set [options]
Sets desired shadow value for specific device serial
Options:
-V, --version output the version number
-s, --serial <serial> serial number of the destination device eg. ant299, johnThing, GZ000112233
-p, --prop-name <desired-property> desired property name eg. _shutdown_09, _on_21, _installer_name
-v, --prop-value <desired-value> value for the desired property eg. true, false, null, 123, "Installer1".
all those values will be parsed via JSON.parse().
-h, --help output usage information
Disable shutdown (setting to false
)
# using shorthand
stella shadow-set -s dimitryThing -p _shutdown_09 -v false
# using longhand
stella shadow-set --serial dimitryThing --prop-name _shutdown_09 --prop-value false
Enable shutdown (setting to true
)
# using shorthand
stella shadow-set -s dimitryThing -p _shutdown_09 -v true
# using longhand
stella shadow-set --serial dimitryThing --prop-name _shutdown_09 --prop-value true