The CLI can be configured by creating a YAML file called
config.yaml in the
$HOME/.config/@smartthings/clion MacOS or Linux
You can define multiple profiles with different configurations. Top-level keys other than the special
logging key define these profiles.
The default profile is named "default" and will be used unless otherwise specified. Most users can put their configuration options here.
To choose a different profile, you can either set the
environment variable, or use the
-p) command line
argument (when both are used, the command line argument overrides the
The following per-profile config options are supported:
|indent||2||Indent level for JSON or YAML output.|
|compactTableOutput||true||Compact table output without lines between rows.|
|token||none||Use a bearer token (such as a PAT) for authentication instead of the default login flow.|
Logging is useful when you are developing the CLI itself (rather than using it).
The CLI uses log4js for logging.
Logging is configured using a YAML file called
logging.yaml in the same
location as the config file mentioned above. The contents of this file are
passed directly to log4js, so any valid log4js configuration can be included
here. The following categories are used in the CLI:
- rest-client - This category is used for the SDK that interfaces with the API. Turn this on to see detailed information for HTTP calls are made to SmartThings.
- cli - This is the generic logger used by the CLI.