From 80b5426d6299ca5964a205b219c672169c5a3e61 Mon Sep 17 00:00:00 2001 From: Ross Stenersen Date: Tue, 23 Sep 2025 14:43:29 -0500 Subject: [PATCH] chore: misc prep for release with ES modules, yargs, and nexe builds --- .github/workflows/cd.yaml | 8 +- .github/workflows/ci.yaml | 4 +- CHANGELOG.md | 15 + README.md | 5891 +---------------------------- doc/configuration.md | 8 +- package-lock.json | 5005 ++++++++++++++++++------ package.json | 39 +- src/build-tools/build-binaries.ts | 80 + src/build-tools/declarations.d.ts | 1 + src/build-tools/update-readme.ts | 47 + src/index.ts | 7 + src/run.ts | 3 + temporary-notes.md | 7 - tsconfig.json | 6 +- zip-binaries.mjs | 58 - 15 files changed, 4119 insertions(+), 7060 deletions(-) create mode 100644 src/build-tools/build-binaries.ts create mode 100644 src/build-tools/declarations.d.ts create mode 100644 src/build-tools/update-readme.ts delete mode 100644 temporary-notes.md delete mode 100644 zip-binaries.mjs diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml index 9ebcce5f0..b0215b446 100644 --- a/.github/workflows/cd.yaml +++ b/.github/workflows/cd.yaml @@ -28,7 +28,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v3 with: - node-version: 24.4.1 + node-version: 24.8.0 - name: Install Dependencies run: npm ci @@ -83,7 +83,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v3 with: - node-version: 24.4.1 + node-version: 24.8.0 - run: npm ci - run: npm run build @@ -172,7 +172,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v3 with: - node-version: 24.4.1 + node-version: 24.8.0 - run: npm ci @@ -187,7 +187,7 @@ jobs: body_path: ${{ github.workspace }}/RELEASE_NOTES.txt tag_name: ${{ needs.release.outputs.cli-tag }} prerelease: false - files: 'packages/cli/dist_bin/**/*.@(tar.gz|zip)' + files: 'packages/cli/dist_bin/**/*.@(tgz|zip)' homebrew-formula: needs: [release, github-release] diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index b163168c2..c50a0a814 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -12,7 +12,7 @@ jobs: fetch-depth: 0 - uses: actions/setup-node@v3 with: - node-version: 24.4.1 + node-version: 24.8.0 - run: npm ci - run: npx commitlint --from HEAD~${{ github.event.pull_request.commits }} --to HEAD @@ -23,7 +23,7 @@ jobs: fail-fast: false matrix: # add/remove versions as we move support forward - node-version: [24] + node-version: [24.8.0] os: [ubuntu-latest, macos-latest, windows-latest] steps: diff --git a/CHANGELOG.md b/CHANGELOG.md index fa9e44015..9c0204c72 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,20 @@ # Change Log +## 2.0.0 + +* All commands now have examples in their help (`smartthings --help`). +* args that require enum-like types are now case-insensitive. e.g. You can now list zigbee devices + with `smartthings devices --type zigbee`. +* The config file location is now determined by [envPaths](https://www.npmjs.com/package/env-paths) library + rather than oclif. A reasonable attempt has been made at finding the old config and copying it for + the user so normally no change is needed other than making changes in the new file if necessary. + The `config` command now displays the name of the configuration file. +* Commands that take a capability specification on the command line now get the version from a flag + rather than an argument. e.g. `smartthings capabilities myteam.myCapability --capability-version 1` + instead of `smartthings capabilities myteam.myCapability 1`. Note that the version is always one, + so this flag is not necessary at this time. +* Under-the-hood changes to make the CLI more maintainable. + ## 1.10.5 ### Patch Changes diff --git a/README.md b/README.md index cc59a16e1..da47a55aa 100644 --- a/README.md +++ b/README.md @@ -5,33 +5,21 @@ ![npm](https://img.shields.io/npm/dm/@smartthings/cli) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) - SmartThings CLI ======================= The SmartThings CLI is a tool to help with developing SmartApps and drivers for the SmartThings ecosystem. - -* [Overview](#overview) * [Usage](#usage) * [Helpful Hints](#helpful-hints) * [Commands](#commands) * [Configuration and Logging](#configuration-and-logging) - # Usage ## Installation -### Homebrew (macOS) +### Homebrew (MacOS) ```console brew install smartthingscommunity/smartthings/smartthings @@ -46,6 +34,21 @@ Download and run the `smartthings.msi` installer from the [latest Release](https 1. Download the appropriate zipped binary from the [latest Release](https://github.com/SmartThingsCommunity/smartthings-cli/releases). 1. Extract and install it on your system path. It does not need administrator privileges but will need to be executable. +### Other + +The CLI can be used on any platform that supports Node 24. + +First, install at least [Node version 24.8.0](https://nodejs.org/en/download/current) on your machine. +The official Node release can be found here: + +https://nodejs.org/en/download/current + +Then, install the CLI. + +```console +npm install --global @smartthings/cli +``` + ## Verify Installation Run `smartthings --version` and verify the version matches the latest release. @@ -75,6 +78,16 @@ going to the console or JSON otherwise. | input | i | Specify a filename for input. | | output | o | Specify a filename for output. The extension of this file will control its type unless overridden with `--json` or `--yaml`. | +## Shell Completions + +On MacOS with zsh, run `smartthings generate-completions-script >> ~/.zshrc`. Note that +when running this command, a comment suggests adding to `.zprofile` on MacOS but I found +this did not work for me. + +Linux instructions can be found here. These have not been tested yet. + +https://yargs.js.org/docs/#api-reference-completioncmd-description-fn + ## Authentication The CLI supports an automatic login flow that pops up a browser window @@ -101,7 +114,7 @@ headless servers or for users who frequently switch between accounts. 1. Commands that take input accept stdin or a file specified by the `--input` (shortcut `-i`) flag. 1. Commands that output data will output the data to stdout unless a file - is specified the using `--output (shortcut `-o`) flag. + is specified the using `--output` (shortcut `-o`) flag. 1. When no output format is specified, the CLI outputs a summary of the most useful information in table format. For full details, use `--json` (`-j`) or `--yaml` (`-y`). 1. When a command takes input and results in output, the format of the output @@ -113,5715 +126,151 @@ headless servers or for users who frequently switch between accounts. # Commands -Commands that use the SmartThings REST API are organized in topics -that map to the API spec. - - -* [`smartthings apps [ID]`](#smartthings-apps-id) -* [`smartthings apps:authorize ARN`](#smartthings-appsauthorize-arn) -* [`smartthings apps:create`](#smartthings-appscreate) -* [`smartthings apps:delete [ID]`](#smartthings-appsdelete-id) -* [`smartthings apps:oauth [ID]`](#smartthings-appsoauth-id) -* [`smartthings apps:oauth:generate [ID]`](#smartthings-appsoauthgenerate-id) -* [`smartthings apps:oauth:update [ID]`](#smartthings-appsoauthupdate-id) -* [`smartthings apps:register [ID]`](#smartthings-appsregister-id) -* [`smartthings apps:settings [ID]`](#smartthings-appssettings-id) -* [`smartthings apps:settings:update [ID]`](#smartthings-appssettingsupdate-id) -* [`smartthings apps:update [ID]`](#smartthings-appsupdate-id) -* [`smartthings autocomplete [SHELL]`](#smartthings-autocomplete-shell) -* [`smartthings capabilities [ID] [VERSION]`](#smartthings-capabilities-id-version) -* [`smartthings capabilities:create`](#smartthings-capabilitiescreate) -* [`smartthings capabilities:delete [ID] [VERSION]`](#smartthings-capabilitiesdelete-id-version) -* [`smartthings capabilities:namespaces`](#smartthings-capabilitiesnamespaces) -* [`smartthings capabilities:presentation [ID] [VERSION]`](#smartthings-capabilitiespresentation-id-version) -* [`smartthings capabilities:presentation:create [ID] [VERSION]`](#smartthings-capabilitiespresentationcreate-id-version) -* [`smartthings capabilities:presentation:update [ID] [VERSION]`](#smartthings-capabilitiespresentationupdate-id-version) -* [`smartthings capabilities:translations [ID] [VERSION] [TAG]`](#smartthings-capabilitiestranslations-id-version-tag) -* [`smartthings capabilities:translations:create [ID] [VERSION]`](#smartthings-capabilitiestranslationscreate-id-version) -* [`smartthings capabilities:translations:update [ID] [VERSION]`](#smartthings-capabilitiestranslationsupdate-id-version) -* [`smartthings capabilities:translations:upsert [ID] [VERSION]`](#smartthings-capabilitiestranslationsupsert-id-version) -* [`smartthings capabilities:update [ID] [VERSION]`](#smartthings-capabilitiesupdate-id-version) -* [`smartthings config [NAME]`](#smartthings-config-name) -* [`smartthings config:reset`](#smartthings-configreset) -* [`smartthings devicepreferences [IDORINDEX]`](#smartthings-devicepreferences-idorindex) -* [`smartthings devicepreferences:create`](#smartthings-devicepreferencescreate) -* [`smartthings devicepreferences:translations [PREFERENCEID] [TAG]`](#smartthings-devicepreferencestranslations-preferenceid-tag) -* [`smartthings devicepreferences:translations:create [PREFERENCEID]`](#smartthings-devicepreferencestranslationscreate-preferenceid) -* [`smartthings devicepreferences:translations:update [PREFERENCEID]`](#smartthings-devicepreferencestranslationsupdate-preferenceid) -* [`smartthings devicepreferences:update [ID]`](#smartthings-devicepreferencesupdate-id) -* [`smartthings deviceprofiles [ID]`](#smartthings-deviceprofiles-id) -* [`smartthings deviceprofiles:create`](#smartthings-deviceprofilescreate) -* [`smartthings deviceprofiles:delete [ID]`](#smartthings-deviceprofilesdelete-id) -* [`smartthings deviceprofiles:device-config [ID]`](#smartthings-deviceprofilesdevice-config-id) -* [`smartthings deviceprofiles:presentation [ID]`](#smartthings-deviceprofilespresentation-id) -* [`smartthings deviceprofiles:publish [ID]`](#smartthings-deviceprofilespublish-id) -* [`smartthings deviceprofiles:translations [ID] [TAG]`](#smartthings-deviceprofilestranslations-id-tag) -* [`smartthings deviceprofiles:translations:delete [ID] [TAG]`](#smartthings-deviceprofilestranslationsdelete-id-tag) -* [`smartthings deviceprofiles:translations:upsert [ID]`](#smartthings-deviceprofilestranslationsupsert-id) -* [`smartthings deviceprofiles:update [ID]`](#smartthings-deviceprofilesupdate-id) -* [`smartthings deviceprofiles:view [ID]`](#smartthings-deviceprofilesview-id) -* [`smartthings deviceprofiles:view:create`](#smartthings-deviceprofilesviewcreate) -* [`smartthings deviceprofiles:view:update [ID]`](#smartthings-deviceprofilesviewupdate-id) -* [`smartthings devices [ID]`](#smartthings-devices-id) -* [`smartthings devices:capability-status [ID] [COMPONENT] [CAPABILITY]`](#smartthings-devicescapability-status-id-component-capability) -* [`smartthings devices:commands [ID] [COMMAND]`](#smartthings-devicescommands-id-command) -* [`smartthings devices:component-status [ID] [COMPONENT]`](#smartthings-devicescomponent-status-id-component) -* [`smartthings devices:delete [ID]`](#smartthings-devicesdelete-id) -* [`smartthings devices:health [ID]`](#smartthings-deviceshealth-id) -* [`smartthings devices:history [ID]`](#smartthings-deviceshistory-id) -* [`smartthings devices:preferences [ID]`](#smartthings-devicespreferences-id) -* [`smartthings devices:presentation [ID]`](#smartthings-devicespresentation-id) -* [`smartthings devices:rename [ID] [LABEL]`](#smartthings-devicesrename-id-label) -* [`smartthings devices:status [ID]`](#smartthings-devicesstatus-id) -* [`smartthings devices:update [ID]`](#smartthings-devicesupdate-id) -* [`smartthings edge:channels [IDORINDEX]`](#smartthings-edgechannels-idorindex) -* [`smartthings edge:channels:assign [DRIVERID] [VERSION]`](#smartthings-edgechannelsassign-driverid-version) -* [`smartthings edge:channels:create`](#smartthings-edgechannelscreate) -* [`smartthings edge:channels:delete [ID]`](#smartthings-edgechannelsdelete-id) -* [`smartthings edge:channels:drivers [IDORINDEX]`](#smartthings-edgechannelsdrivers-idorindex) -* [`smartthings edge:channels:enroll [HUBID]`](#smartthings-edgechannelsenroll-hubid) -* [`smartthings edge:channels:enrollments [IDORINDEX]`](#smartthings-edgechannelsenrollments-idorindex) -* [`smartthings edge:channels:invites [IDORINDEX]`](#smartthings-edgechannelsinvites-idorindex) -* [`smartthings edge:channels:invites:accept ID`](#smartthings-edgechannelsinvitesaccept-id) -* [`smartthings edge:channels:invites:create`](#smartthings-edgechannelsinvitescreate) -* [`smartthings edge:channels:invites:delete [ID]`](#smartthings-edgechannelsinvitesdelete-id) -* [`smartthings edge:channels:metainfo [IDORINDEX]`](#smartthings-edgechannelsmetainfo-idorindex) -* [`smartthings edge:channels:unassign [DRIVERID]`](#smartthings-edgechannelsunassign-driverid) -* [`smartthings edge:channels:unenroll [HUBID]`](#smartthings-edgechannelsunenroll-hubid) -* [`smartthings edge:channels:update [ID]`](#smartthings-edgechannelsupdate-id) -* [`smartthings edge:drivers [IDORINDEX]`](#smartthings-edgedrivers-idorindex) -* [`smartthings edge:drivers:default [IDORINDEX]`](#smartthings-edgedriversdefault-idorindex) -* [`smartthings edge:drivers:delete [ID]`](#smartthings-edgedriversdelete-id) -* [`smartthings edge:drivers:devices [IDORINDEX]`](#smartthings-edgedriversdevices-idorindex) -* [`smartthings edge:drivers:install [DRIVERID]`](#smartthings-edgedriversinstall-driverid) -* [`smartthings edge:drivers:installed [IDORINDEX]`](#smartthings-edgedriversinstalled-idorindex) -* [`smartthings edge:drivers:logcat [DRIVERID]`](#smartthings-edgedriverslogcat-driverid) -* [`smartthings edge:drivers:package [PROJECTDIRECTORY]`](#smartthings-edgedriverspackage-projectdirectory) -* [`smartthings edge:drivers:prune [DRIVERID]`](#smartthings-edgedriversprune-driverid) -* [`smartthings edge:drivers:switch [DEVICEID]`](#smartthings-edgedriversswitch-deviceid) -* [`smartthings edge:drivers:uninstall [DRIVERID]`](#smartthings-edgedriversuninstall-driverid) -* [`smartthings help [COMMAND]`](#smartthings-help-command) -* [`smartthings installedapps [ID]`](#smartthings-installedapps-id) -* [`smartthings installedapps:delete [ID]`](#smartthings-installedappsdelete-id) -* [`smartthings installedapps:rename [ID] [NAME]`](#smartthings-installedappsrename-id-name) -* [`smartthings installedschema [ID]`](#smartthings-installedschema-id) -* [`smartthings installedschema:delete [ID]`](#smartthings-installedschemadelete-id) -* [`smartthings locations [IDORINDEX]`](#smartthings-locations-idorindex) -* [`smartthings locations:create`](#smartthings-locationscreate) -* [`smartthings locations:delete [ID]`](#smartthings-locationsdelete-id) -* [`smartthings locations:history [ID]`](#smartthings-locationshistory-id) -* [`smartthings locations:modes [IDORINDEX]`](#smartthings-locationsmodes-idorindex) -* [`smartthings locations:modes:create`](#smartthings-locationsmodescreate) -* [`smartthings locations:modes:delete [ID]`](#smartthings-locationsmodesdelete-id) -* [`smartthings locations:modes:getcurrent`](#smartthings-locationsmodesgetcurrent) -* [`smartthings locations:modes:setcurrent [ID]`](#smartthings-locationsmodessetcurrent-id) -* [`smartthings locations:modes:update [ID]`](#smartthings-locationsmodesupdate-id) -* [`smartthings locations:rooms [IDORINDEX]`](#smartthings-locationsrooms-idorindex) -* [`smartthings locations:rooms:create`](#smartthings-locationsroomscreate) -* [`smartthings locations:rooms:delete [ID]`](#smartthings-locationsroomsdelete-id) -* [`smartthings locations:rooms:update [ID]`](#smartthings-locationsroomsupdate-id) -* [`smartthings locations:update [ID]`](#smartthings-locationsupdate-id) -* [`smartthings logout`](#smartthings-logout) -* [`smartthings organizations [ID]`](#smartthings-organizations-id) -* [`smartthings organizations:current`](#smartthings-organizationscurrent) -* [`smartthings plugins`](#smartthings-plugins) -* [`smartthings plugins:install PLUGIN...`](#smartthings-pluginsinstall-plugin) -* [`smartthings plugins:inspect PLUGIN...`](#smartthings-pluginsinspect-plugin) -* [`smartthings plugins:install PLUGIN...`](#smartthings-pluginsinstall-plugin-1) -* [`smartthings plugins:link PLUGIN`](#smartthings-pluginslink-plugin) -* [`smartthings plugins:uninstall PLUGIN...`](#smartthings-pluginsuninstall-plugin) -* [`smartthings plugins:uninstall PLUGIN...`](#smartthings-pluginsuninstall-plugin-1) -* [`smartthings plugins:uninstall PLUGIN...`](#smartthings-pluginsuninstall-plugin-2) -* [`smartthings plugins:update`](#smartthings-pluginsupdate) -* [`smartthings presentation PRESENTATIONID [MANUFACTURERNAME]`](#smartthings-presentation-presentationid-manufacturername) -* [`smartthings presentation:device-config PRESENTATIONID [MANUFACTURERNAME]`](#smartthings-presentationdevice-config-presentationid-manufacturername) -* [`smartthings presentation:device-config:create`](#smartthings-presentationdevice-configcreate) -* [`smartthings presentation:device-config:generate ID`](#smartthings-presentationdevice-configgenerate-id) -* [`smartthings rules [IDORINDEX]`](#smartthings-rules-idorindex) -* [`smartthings rules:create`](#smartthings-rulescreate) -* [`smartthings rules:delete [ID]`](#smartthings-rulesdelete-id) -* [`smartthings rules:execute [ID]`](#smartthings-rulesexecute-id) -* [`smartthings rules:update [ID]`](#smartthings-rulesupdate-id) -* [`smartthings scenes [IDORINDEX]`](#smartthings-scenes-idorindex) -* [`smartthings scenes:execute [ID]`](#smartthings-scenesexecute-id) -* [`smartthings schema [ID]`](#smartthings-schema-id) -* [`smartthings schema:authorize ARN`](#smartthings-schemaauthorize-arn) -* [`smartthings schema:create`](#smartthings-schemacreate) -* [`smartthings schema:delete [ID]`](#smartthings-schemadelete-id) -* [`smartthings schema:regenerate [ID]`](#smartthings-schemaregenerate-id) -* [`smartthings schema:update [ID]`](#smartthings-schemaupdate-id) -* [`smartthings virtualdevices [ID]`](#smartthings-virtualdevices-id) -* [`smartthings virtualdevices:create`](#smartthings-virtualdevicescreate) -* [`smartthings virtualdevices:create-standard`](#smartthings-virtualdevicescreate-standard) -* [`smartthings virtualdevices:delete [ID]`](#smartthings-virtualdevicesdelete-id) -* [`smartthings virtualdevices:events [ID] [NAME] [VALUE] [UNIT]`](#smartthings-virtualdevicesevents-id-name-value-unit) -* [`smartthings virtualdevices:update [ID]`](#smartthings-virtualdevicesupdate-id) - -## `smartthings apps [ID]` - -get a specific app or a list of apps - -``` -USAGE - $ smartthings apps [ID] [-h] [-p ] [-t ] [--language ] [-j] [-y] [-o ] - [--type ] [--classification ] [-v] - -ARGUMENTS - ID the app id or number from list - -FLAGS - -v, --verbose include URLs and ARNs in table output - --classification=... filter results by one or more classifications, AUTOMATION, SERVICE, DEVICE, - CONNECTED_SERVICE - --type= filter results by appType, WEBHOOK_SMART_APP, LAMBDA_SMART_APP, API_ONLY - -COMMON FLAGS - -h, --help Show CLI help. - -j, --json use JSON format of input and/or output - -o, --output= specify output file - -p, --profile= [default: default] configuration profile - -t, --token= the auth token to use - -y, --yaml use YAML format of input and/or output - --language= ISO language code or "NONE" to not specify a language. Defaults to the OS locale - -DESCRIPTION - get a specific app or a list of apps - - For API information, see: - - https://developer.smartthings.com/docs/api/public/#operation/listApps, - https://developer.smartthings.com/docs/api/public/#operation/getApp - -EXAMPLES - list all apps - - $ smartthings apps - - list the first app in the list retrieved by running "smartthings apps" - - $ smartthings apps 1 - - list an app by id - - $ smartthings apps 5dfd6626-ab1d-42da-bb76-90def3153998 - - include URLs and ARNs in the output - - $ smartthings apps --verbose - - list SERVICE classification apps - - $ smartthings apps --classification SERVICE - - list API-only apps - - $ smartthings apps --type API_ONLY -``` - -_See code: [src/commands/apps.ts](https://github.com/SmartThingsCommunity/smartthings-cli/blob/@smartthings/cli@1.7.0/packages/cli/src/commands/apps.ts)_ - -## `smartthings apps:authorize ARN` - -authorize calls to your AWS Lambda function from SmartThings - -``` -USAGE - $ smartthings apps:authorize [ARN] [-h] [-p ] [--principal ] [--statement ] - -ARGUMENTS - ARN the ARN of the AWS Lambda function - -FLAGS - --principal= use this principal instead of the default when authorizing lambda functions - --statement= use this statement id instead of the default when authorizing lambda functions - -COMMON FLAGS - -h, --help Show CLI help. - -p, --profile= [default: default] configuration profile - -DESCRIPTION - authorize calls to your AWS Lambda function from SmartThings - -EXAMPLES - authorize an app - - NOTE: This command is the same as running the following with the AWS CLI: - - $ aws lambda add-permission --region us-east-1 --function-name \ - > arn:aws:lambda:us-east-1:1234567890:function:your-test-app \ - > --statement smartthings --principal 906037444270 --action lambda:InvokeFunction - - This command requires your machine to be configured to run the AWS CLI. - - $ smartthings apps:authorize arn:aws:lambda:us-east-1:1234567890:function:your-test-app -``` - -_See code: [src/commands/apps/authorize.ts](https://github.com/SmartThingsCommunity/smartthings-cli/blob/@smartthings/cli@1.7.0/packages/cli/src/commands/apps/authorize.ts)_ - -## `smartthings apps:create` - -create an app - -``` -USAGE - $ smartthings apps:create [-h] [-p ] [-t ] [--language ] [-j] [-y] [-i ] [-o - ] [-d] [--authorize] [--principal ] [--statement ] - -FLAGS - -d, --dry-run produce JSON but don't actually submit - --authorize authorize Lambda functions to be called by SmartThings - --principal= use this principal instead of the default when authorizing lambda functions - --statement= use this statement id instead of the default when authorizing lambda functions - -COMMON FLAGS - -h, --help Show CLI help. - -i, --input= specify input file - -j, --json use JSON format of input and/or output - -o, --output= specify output file - -p, --profile= [default: default] configuration profile - -t, --token= the auth token to use - -y, --yaml use YAML format of input and/or output - --language= ISO language code or "NONE" to not specify a language. Defaults to the OS locale - -DESCRIPTION - create an app - - For API information, see: - - https://developer.smartthings.com/docs/api/public/#operation/createApp - -EXAMPLES - create an OAuth-In app from prompted input - - $ smartthings apps:create - - create an app defined in "my-app.yaml" - - $ smartthings apps:create -i my-app.yaml - - create an app defined in "my-app.json" and then authorize it - (See "smartthings apps:authorize" for more information on authorization.) - - $ smartthings apps:create -i my-app.json --authorize -``` - -_See code: [src/commands/apps/create.ts](https://github.com/SmartThingsCommunity/smartthings-cli/blob/@smartthings/cli@1.7.0/packages/cli/src/commands/apps/create.ts)_ - -## `smartthings apps:delete [ID]` - -delete an app - -``` -USAGE - $ smartthings apps:delete [ID] [-h] [-p ] [-t ] [--language ] - -ARGUMENTS - ID app profile UUID or number in the list - -COMMON FLAGS - -h, --help Show CLI help. - -p, --profile= [default: default] configuration profile - -t, --token= the auth token to use - --language= ISO language code or "NONE" to not specify a language. Defaults to the OS locale - -DESCRIPTION - delete an app - - For API information, see: - - https://developer.smartthings.com/docs/api/public/#operation/deleteApp - -EXAMPLES - select app to delete from list - - $ smartthings apps:delete - - delete a specific app by id - - $ smartthings apps:delete 5dfd6626-ab1d-42da-bb76-90def3153998 -``` - -_See code: [src/commands/apps/delete.ts](https://github.com/SmartThingsCommunity/smartthings-cli/blob/@smartthings/cli@1.7.0/packages/cli/src/commands/apps/delete.ts)_ - -## `smartthings apps:oauth [ID]` - -get OAuth information for the app - -``` -USAGE - $ smartthings apps:oauth [ID] [-h] [-p ] [-t ] [--language ] [-j] [-y] [-o ] - -ARGUMENTS - ID the app id or number in the list - -COMMON FLAGS - -h, --help Show CLI help. - -j, --json use JSON format of input and/or output - -o, --output= specify output file - -p, --profile= [default: default] configuration profile - -t, --token= the auth token to use - -y, --yaml use YAML format of input and/or output - --language= ISO language code or "NONE" to not specify a language. Defaults to the OS locale - -DESCRIPTION - get OAuth information for the app - - For API information, see: - - https://developer.smartthings.com/docs/api/public/#operation/getAppOauth - -EXAMPLES - prompt for an app and list OAuth information for it - - $ smartthings apps:oauth - - list OAuth information for the second app in the list generated by "smartthings apps" - - $ smartthings apps:oauth 2 - - list OAuth information for the app with the given id - - $ smartthings apps:oauth 392bcb11-e251-44f3-b58b-17f93015f3aa -``` - -_See code: [src/commands/apps/oauth.ts](https://github.com/SmartThingsCommunity/smartthings-cli/blob/@smartthings/cli@1.7.0/packages/cli/src/commands/apps/oauth.ts)_ - -## `smartthings apps:oauth:generate [ID]` - -regenerate the OAuth clientId and clientSecret of an app - -``` -USAGE - $ smartthings apps:oauth:generate [ID] [-h] [-p ] [-t ] [--language ] [-j] [-y] [-i ] [-o - ] [-d] - -ARGUMENTS - ID the app id - -FLAGS - -d, --dry-run produce JSON but don't actually submit - -COMMON FLAGS - -h, --help Show CLI help. - -i, --input= specify input file - -j, --json use JSON format of input and/or output - -o, --output= specify output file - -p, --profile= [default: default] configuration profile - -t, --token= the auth token to use - -y, --yaml use YAML format of input and/or output - --language= ISO language code or "NONE" to not specify a language. Defaults to the OS locale - -DESCRIPTION - regenerate the OAuth clientId and clientSecret of an app - - For API information, see: - - https://developer.smartthings.com/docs/api/public/#operation/generateAppOauth - -EXAMPLES - regenerate the OAuth clientId and clientSecret of the app with the given id - - $ smartthings apps:oauth:generate 392bcb11-e251-44f3-b58b-17f93015f3aa -``` - -_See code: [src/commands/apps/oauth/generate.ts](https://github.com/SmartThingsCommunity/smartthings-cli/blob/@smartthings/cli@1.7.0/packages/cli/src/commands/apps/oauth/generate.ts)_ - -## `smartthings apps:oauth:update [ID]` - -update the OAuth settings of an app - -``` -USAGE - $ smartthings apps:oauth:update [ID] [-h] [-p ] [-t ] [--language ] [-j] [-y] [-i ] [-o - ] [-d] - -ARGUMENTS - ID the app id - -FLAGS - -d, --dry-run produce JSON but don't actually submit - -COMMON FLAGS - -h, --help Show CLI help. - -i, --input= specify input file - -j, --json use JSON format of input and/or output - -o, --output= specify output file - -p, --profile= [default: default] configuration profile - -t, --token= the auth token to use - -y, --yaml use YAML format of input and/or output - --language= ISO language code or "NONE" to not specify a language. Defaults to the OS locale - -DESCRIPTION - update the OAuth settings of an app - - For API information, see: - - https://developer.smartthings.com/docs/api/public/#operation/updateAppOauth - -EXAMPLES - prompt for an app and update its OAuth settings interactively" +Commands that use the SmartThings REST API are organized in topics that map to the API spec. - $ smartthings apps:oauth:update +More information can be found using the `--help` flag with any command. For example, to find +details on the `edge:channels:create` command, run: - prompt for an app and update its OAuth settings using the data in "oauth-settings.json" - - $ smartthings apps:oauth:update -i oauth-settings.json - - update the OAuth settings for the app with the given id using the data in "oauth-settings.json" - - $ smartthings apps:oauth:update 392bcb11-e251-44f3-b58b-17f93015f3aa -i oauth-settings.json -``` - -_See code: [src/commands/apps/oauth/update.ts](https://github.com/SmartThingsCommunity/smartthings-cli/blob/@smartthings/cli@1.7.0/packages/cli/src/commands/apps/oauth/update.ts)_ - -## `smartthings apps:register [ID]` - -send request to app target URL to confirm existence and authorize lifecycle events - -``` -USAGE - $ smartthings apps:register [ID] [-h] [-p ] [-t ] [--language ] - -ARGUMENTS - ID the app id - -COMMON FLAGS - -h, --help Show CLI help. - -p, --profile= [default: default] configuration profile - -t, --token= the auth token to use - --language= ISO language code or "NONE" to not specify a language. Defaults to the OS locale - -DESCRIPTION - send request to app target URL to confirm existence and authorize lifecycle events - - For API information, see: - - https://developer.smartthings.com/docs/api/public/#operation/register - -EXAMPLES - send registration request to the app with the given id - - $ smartthings apps:register 392bcb11-e251-44f3-b58b-17f93015f3aa -``` - -_See code: [src/commands/apps/register.ts](https://github.com/SmartThingsCommunity/smartthings-cli/blob/@smartthings/cli@1.7.0/packages/cli/src/commands/apps/register.ts)_ - -## `smartthings apps:settings [ID]` - -get the settings of an app - -``` -USAGE - $ smartthings apps:settings [ID] [-h] [-p ] [-t ] [--language ] [-j] [-y] [-o ] - -ARGUMENTS - ID the app id - -COMMON FLAGS - -h, --help Show CLI help. - -j, --json use JSON format of input and/or output - -o, --output= specify output file - -p, --profile= [default: default] configuration profile - -t, --token= the auth token to use - -y, --yaml use YAML format of input and/or output - --language= ISO language code or "NONE" to not specify a language. Defaults to the OS locale - -DESCRIPTION - get the settings of an app - - For API information, see: - - https://developer.smartthings.com/docs/api/public/#operation/getAppSettings - -EXAMPLES - choose an app from a list and get its settings - - $ smartthings apps:settings - - get the settings of the app with the given id - - $ smartthings apps:settings 392bcb11-e251-44f3-b58b-17f93015f3aa - - get the settings of the third app in the list generated by "smartthings apps" - - $ smartthings apps:settings 3 -``` - -_See code: [src/commands/apps/settings.ts](https://github.com/SmartThingsCommunity/smartthings-cli/blob/@smartthings/cli@1.7.0/packages/cli/src/commands/apps/settings.ts)_ - -## `smartthings apps:settings:update [ID]` - -update the settings of an app - -``` -USAGE - $ smartthings apps:settings:update [ID] [-h] [-p ] [-t ] [--language ] [-j] [-y] [-i ] [-o - ] [-d] - -ARGUMENTS - ID the app id - -FLAGS - -d, --dry-run produce JSON but don't actually submit - -COMMON FLAGS - -h, --help Show CLI help. - -i, --input= specify input file - -j, --json use JSON format of input and/or output - -o, --output= specify output file - -p, --profile= [default: default] configuration profile - -t, --token= the auth token to use - -y, --yaml use YAML format of input and/or output - --language= ISO language code or "NONE" to not specify a language. Defaults to the OS locale - -DESCRIPTION - update the settings of an app - - For API information, see: - - https://developer.smartthings.com/docs/api/public/#operation/updateAppSettings - -EXAMPLES - update the settings of the app with the given id using the data in "app-settings.json" - - $ smartthings apps:settings:update 392bcb11-e251-44f3-b58b-17f93015f3aa -i app-settings.json - - ask for the ID of an app to update and then update it using the data in "app-settings.json" - - $ smartthings apps:settings:update -i app-settings.json -``` - -_See code: [src/commands/apps/settings/update.ts](https://github.com/SmartThingsCommunity/smartthings-cli/blob/@smartthings/cli@1.7.0/packages/cli/src/commands/apps/settings/update.ts)_ - -## `smartthings apps:update [ID]` - -update the settings of the app - -``` -USAGE - $ smartthings apps:update [ID] [-h] [-p ] [-t ] [--language ] [-j] [-y] [-i ] [-o - ] [-d] [--authorize] [--principal ] [--statement ] - -ARGUMENTS - ID the app id - -FLAGS - -d, --dry-run produce JSON but don't actually submit - --authorize authorize Lambda functions to be called by SmartThings - --principal= use this principal instead of the default when authorizing lambda functions - --statement= use this statement id instead of the default when authorizing lambda functions - -COMMON FLAGS - -h, --help Show CLI help. - -i, --input= specify input file - -j, --json use JSON format of input and/or output - -o, --output= specify output file - -p, --profile= [default: default] configuration profile - -t, --token= the auth token to use - -y, --yaml use YAML format of input and/or output - --language= ISO language code or "NONE" to not specify a language. Defaults to the OS locale - -DESCRIPTION - update the settings of the app - - See apps:oauth:update and apps:oauth:generate for updating oauth-related data. - - For API information, see: - - https://developer.smartthings.com/docs/api/public/#operation/updateApp - -EXAMPLES - prompt for an app and edit it interactively - - $ smartthings apps:update - - prompt for an app and update it using the data in "my-app.json" - - $ smartthings apps:update -i my-app.json - - update the app with the given id using the data in "my-app.json" - - $ smartthings apps:update 392bcb11-e251-44f3-b58b-17f93015f3aa -i my-app.json - - update the given app using the data in "my-app.json" and then authorize it - (See "smartthings apps:authorize" for more information on authorization.) - - $ smartthings apps:update 392bcb11-e251-44f3-b58b-17f93015f3aa -i my-app.json --authorize -``` - -_See code: [src/commands/apps/update.ts](https://github.com/SmartThingsCommunity/smartthings-cli/blob/@smartthings/cli@1.7.0/packages/cli/src/commands/apps/update.ts)_ - -## `smartthings autocomplete [SHELL]` - -display autocomplete installation instructions - -``` -USAGE - $ smartthings autocomplete [SHELL] [-r] - -ARGUMENTS - SHELL shell type - -FLAGS - -r, --refresh-cache Refresh cache (ignores displaying instructions) - -DESCRIPTION - display autocomplete installation instructions - -EXAMPLES - $ smartthings autocomplete - - $ smartthings autocomplete bash - - $ smartthings autocomplete zsh - - $ smartthings autocomplete --refresh-cache -``` - -_See code: [@oclif/plugin-autocomplete](https://github.com/oclif/plugin-autocomplete/blob/v1.3.0/src/commands/autocomplete/index.ts)_ - -## `smartthings capabilities [ID] [VERSION]` - -get a specific capability or a list of capabilities - -``` -USAGE - $ smartthings capabilities [ID] [VERSION] [-h] [-p ] [-t ] [--language ] [-O ] [-j] - [-y] [-o ] [-A] [-n ] [-s] - -ARGUMENTS - ID the capability id or number in list - VERSION the capability version - -FLAGS - -A, --all-organizations include entities from all organizations the user belongs to - -O, --organization= the organization ID to use for this command - -n, --namespace= a specific namespace to query; will use all by default - -s, --standard show standard SmartThings capabilities - -COMMON FLAGS - -h, --help Show CLI help. - -j, --json use JSON format of input and/or output - -o, --output= specify output file - -p, --profile= [default: default] configuration profile - -t, --token= the auth token to use - -y, --yaml use YAML format of input and/or output - --language= ISO language code or "NONE" to not specify a language. Defaults to the OS locale - -DESCRIPTION - get a specific capability or a list of capabilities - - For API information, see: - - https://developer.smartthings.com/docs/api/public/#operation/listNamespacedCapabilities, - https://developer.smartthings.com/docs/api/public/#operation/listCapabilities, - https://developer.smartthings.com/docs/api/public/#operation/getCapability -``` - -_See code: [src/commands/capabilities.ts](https://github.com/SmartThingsCommunity/smartthings-cli/blob/@smartthings/cli@1.7.0/packages/cli/src/commands/capabilities.ts)_ - -## `smartthings capabilities:create` - -create a capability for a user - -``` -USAGE - $ smartthings capabilities:create [-h] [-p ] [-t ] [--language ] [-O ] [-j] [-y] [-i - ] [-o ] [-d] [-n ] - -FLAGS - -O, --organization= the organization ID to use for this command - -d, --dry-run produce JSON but don't actually submit - -n, --namespace= the namespace to create the capability under - -COMMON FLAGS - -h, --help Show CLI help. - -i, --input= specify input file - -j, --json use JSON format of input and/or output - -o, --output= specify output file - -p, --profile= [default: default] configuration profile - -t, --token= the auth token to use - -y, --yaml use YAML format of input and/or output - --language= ISO language code or "NONE" to not specify a language. Defaults to the OS locale - -DESCRIPTION - create a capability for a user - - For API information, see: - - https://developer.smartthings.com/docs/api/public/#operation/createCapability -``` - -_See code: [src/commands/capabilities/create.ts](https://github.com/SmartThingsCommunity/smartthings-cli/blob/@smartthings/cli@1.7.0/packages/cli/src/commands/capabilities/create.ts)_ - -## `smartthings capabilities:delete [ID] [VERSION]` - -delete a capability - -``` -USAGE - $ smartthings capabilities:delete [ID] [VERSION] [-h] [-p ] [-t ] [--language ] [-O ] - -ARGUMENTS - ID the capability id - VERSION the capability version - -FLAGS - -O, --organization= the organization ID to use for this command - -COMMON FLAGS - -h, --help Show CLI help. - -p, --profile= [default: default] configuration profile - -t, --token= the auth token to use - --language= ISO language code or "NONE" to not specify a language. Defaults to the OS locale - -DESCRIPTION - delete a capability - - For API information, see: - - https://developer.smartthings.com/docs/api/public/#operation/deleteCapability -``` - -_See code: [src/commands/capabilities/delete.ts](https://github.com/SmartThingsCommunity/smartthings-cli/blob/@smartthings/cli@1.7.0/packages/cli/src/commands/capabilities/delete.ts)_ - -## `smartthings capabilities:namespaces` - -list all capability namespaces currently available in a user account - -``` -USAGE - $ smartthings capabilities:namespaces [-h] [-p ] [-t ] [--language ] [-O ] [-j] [-y] [-o - ] - -FLAGS - -O, --organization= the organization ID to use for this command - -COMMON FLAGS - -h, --help Show CLI help. - -j, --json use JSON format of input and/or output - -o, --output= specify output file - -p, --profile= [default: default] configuration profile - -t, --token= the auth token to use - -y, --yaml use YAML format of input and/or output - --language= ISO language code or "NONE" to not specify a language. Defaults to the OS locale - -DESCRIPTION - list all capability namespaces currently available in a user account -``` - -_See code: [src/commands/capabilities/namespaces.ts](https://github.com/SmartThingsCommunity/smartthings-cli/blob/@smartthings/cli@1.7.0/packages/cli/src/commands/capabilities/namespaces.ts)_ - -## `smartthings capabilities:presentation [ID] [VERSION]` - -get presentation information for a specific capability - -``` -USAGE - $ smartthings capabilities:presentation [ID] [VERSION] [-h] [-p ] [-t ] [--language ] [-O ] [-j] - [-y] [-o ] [-n ] - -ARGUMENTS - ID the capability id or number in list - VERSION the capability version - -FLAGS - -O, --organization= the organization ID to use for this command - -n, --namespace= a specific namespace to query; will use all by default - -COMMON FLAGS - -h, --help Show CLI help. - -j, --json use JSON format of input and/or output - -o, --output= specify output file - -p, --profile= [default: default] configuration profile - -t, --token= the auth token to use - -y, --yaml use YAML format of input and/or output - --language= ISO language code or "NONE" to not specify a language. Defaults to the OS locale - -DESCRIPTION - get presentation information for a specific capability - - For API information, see: - - https://developer.smartthings.com/docs/api/public/#operation/getCapabilityPresentation -``` - -_See code: [src/commands/capabilities/presentation.ts](https://github.com/SmartThingsCommunity/smartthings-cli/blob/@smartthings/cli@1.7.0/packages/cli/src/commands/capabilities/presentation.ts)_ - -## `smartthings capabilities:presentation:create [ID] [VERSION]` - -create presentation model for a capability - -``` -USAGE - $ smartthings capabilities:presentation:create [ID] [VERSION] [-h] [-p ] [-t ] [--language ] [-O ] [-j] - [-y] [-i ] [-o ] [-d] - -ARGUMENTS - ID the capability id - VERSION the capability version - -FLAGS - -O, --organization= the organization ID to use for this command - -d, --dry-run produce JSON but don't actually submit - -COMMON FLAGS - -h, --help Show CLI help. - -i, --input= specify input file - -j, --json use JSON format of input and/or output - -o, --output= specify output file - -p, --profile= [default: default] configuration profile - -t, --token= the auth token to use - -y, --yaml use YAML format of input and/or output - --language= ISO language code or "NONE" to not specify a language. Defaults to the OS locale - -DESCRIPTION - create presentation model for a capability - - For API information, see: - - https://developer.smartthings.com/docs/api/public/#operation/createCustomCapabilityPresentation -``` - -_See code: [src/commands/capabilities/presentation/create.ts](https://github.com/SmartThingsCommunity/smartthings-cli/blob/@smartthings/cli@1.7.0/packages/cli/src/commands/capabilities/presentation/create.ts)_ - -## `smartthings capabilities:presentation:update [ID] [VERSION]` - -update presentation information of a capability - -``` -USAGE - $ smartthings capabilities:presentation:update [ID] [VERSION] [-h] [-p ] [-t ] [--language ] [-O ] [-j] - [-y] [-i ] [-o ] [-d] - -ARGUMENTS - ID the capability id - VERSION the capability version - -FLAGS - -O, --organization= the organization ID to use for this command - -d, --dry-run produce JSON but don't actually submit - -COMMON FLAGS - -h, --help Show CLI help. - -i, --input= specify input file - -j, --json use JSON format of input and/or output - -o, --output= specify output file - -p, --profile= [default: default] configuration profile - -t, --token= the auth token to use - -y, --yaml use YAML format of input and/or output - --language= ISO language code or "NONE" to not specify a language. Defaults to the OS locale - -DESCRIPTION - update presentation information of a capability - - For API information, see: - - https://developer.smartthings.com/docs/api/public/#operation/updateCustomCapabilityPresentation -``` - -_See code: [src/commands/capabilities/presentation/update.ts](https://github.com/SmartThingsCommunity/smartthings-cli/blob/@smartthings/cli@1.7.0/packages/cli/src/commands/capabilities/presentation/update.ts)_ - -## `smartthings capabilities:translations [ID] [VERSION] [TAG]` - -get list of locales supported by the capability - -``` -USAGE - $ smartthings capabilities:translations [ID] [VERSION] [TAG] [-h] [-p ] [-t ] [--language ] [-O ] - [-j] [-y] [-o ] [-n ] [-v] - -ARGUMENTS - ID the capability id or number in list - VERSION the capability version - TAG the locale tag - -FLAGS - -O, --organization= the organization ID to use for this command - -n, --namespace= a specific namespace to query; will use all by default - -v, --verbose include list of supported locales in table output - -COMMON FLAGS - -h, --help Show CLI help. - -j, --json use JSON format of input and/or output - -o, --output= specify output file - -p, --profile= [default: default] configuration profile - -t, --token= the auth token to use - -y, --yaml use YAML format of input and/or output - --language= ISO language code or "NONE" to not specify a language. Defaults to the OS locale - -DESCRIPTION - get list of locales supported by the capability - - For API information, see: - - https://developer.smartthings.com/docs/api/public/#operation/listCapabilityLocalizations, - https://developer.smartthings.com/docs/api/public/#operation/getCapabilityLocalization - -EXAMPLES - $ smartthings capabilities:translations - ┌───┬─────────────────────────────┬─────────┬──────────┐ - │ # │ Id │ Version │ Status │ - ├───┼─────────────────────────────┼─────────┼──────────┤ - │ 1 │ custom1.outputModulation │ 1 │ proposed │ - │ 2 │ custom1.outputVoltage │ 1 │ proposed │ - └───┴─────────────────────────────┴─────────┴──────────┘ - - ? Select a capability. 1 - ┌───┬─────┐ - │ # │ Tag │ - ├───┼─────┤ - │ 1 │ en │ - │ 2 │ ko │ - └───┴─────┘ - - $ st capabilities:translations -v - ┌───┬─────────────────────────────┬─────────┬──────────┬────────────┐ - │ # │ Id │ Version │ Status │ Locales │ - ├───┼─────────────────────────────┼─────────┼──────────┼────────────┤ - │ 1 │ custom1.outputModulation │ 1 │ proposed │ ko, en, es │ - │ 2 │ custom1.outputVoltage │ 1 │ proposed │ en │ - └───┴─────────────────────────────┴─────────┴──────────┴────────────┘ - - ? Select a capability. 1 - ┌───┬─────┐ - │ # │ Tag │ - ├───┼─────┤ - │ 1 │ en │ - │ 1 │ es │ - │ 2 │ ko │ - └───┴─────┘ - - $ smartthings capabilities:translations 1 - $ smartthings capabilities:translations custom1.outputModulation - ┌───┬─────┐ - │ # │ Tag │ - ├───┼─────┤ - │ 1 │ en │ - │ 2 │ ko │ - └───┴─────┘ - - $ smartthings capabilities:translations 1 1 - $ smartthings capabilities:translations 1 en - $ smartthings capabilities:translations custom1.outputModulation 1 1 - $ smartthings capabilities:translations custom1.outputModulation 1 en - $ smartthings capabilities:translations custom1.outputModulation en - - Tag: en - - Attributes: - ┌────────────────────────┬───────────────────┬────────────────────────────────┬────────────────────────────────────────────────────┐ - │ Name │ Label │ Description │ Template │ - ├────────────────────────┼───────────────────┼────────────────────────────────┼────────────────────────────────────────────────────┤ - │ outputModulation │ Output Modulation │ Power supply output modulation │ The {{attribute}} of {{device.label}} is {{value}} │ - │ outputModulation.50hz │ 50 Hz │ │ │ - │ outputModulation.60hz │ 60 Hz │ │ │ - └────────────────────────┴───────────────────┴────────────────────────────────┴────────────────────────────────────────────────────┘ - - Commands - ┌──────────────────────────────────────┬───────────────────────┬──────────────────────────────────────────────────┐ - │ Name │ Label │ Description │ - ├──────────────────────────────────────┼───────────────────────┼──────────────────────────────────────────────────┤ - │ setOutputModulation │ Set Output Modulation │ Set the output modulation to the specified value │ - │ setOutputModulation.outputModulation │ Output Modulation │ The desired output modulation │ - └──────────────────────────────────────┴───────────────────────┴──────────────────────────────────────────────────┘ -``` - -_See code: [src/commands/capabilities/translations.ts](https://github.com/SmartThingsCommunity/smartthings-cli/blob/@smartthings/cli@1.7.0/packages/cli/src/commands/capabilities/translations.ts)_ - -## `smartthings capabilities:translations:create [ID] [VERSION]` - -create a capability translation - -``` -USAGE - $ smartthings capabilities:translations:create [ID] [VERSION] [-h] [-p ] [-t ] [--language ] [-O ] [-j] - [-y] [-i ] [-o ] [-d] - -ARGUMENTS - ID the capability id - VERSION the capability version - -FLAGS - -O, --organization= the organization ID to use for this command - -d, --dry-run produce JSON but don't actually submit - -COMMON FLAGS - -h, --help Show CLI help. - -i, --input= specify input file - -j, --json use JSON format of input and/or output - -o, --output= specify output file - -p, --profile= [default: default] configuration profile - -t, --token= the auth token to use - -y, --yaml use YAML format of input and/or output - --language= ISO language code or "NONE" to not specify a language. Defaults to the OS locale - -DESCRIPTION - create a capability translation - - For API information, see: - - https://developer.smartthings.com/docs/api/public/#operation/createCapabilityLocalization - -EXAMPLES - $ smartthings capabilities:translations:create custom1.outputModulation 1 -i en.yaml - - tag: en - label: Output Modulation - attributes: - outputModulation: - label: Output Modulation - displayTemplate: 'The {{attribute}} of {{device.label}} is {{value}}' - i18n: - value: - 50hz: - label: 50 Hz - 60hz: - label: 60 Hz - commands: - setOutputModulation: - label: Set Output Modulation - arguments: - outputModulation: - label: Output Modulation - - $ smartthings capabilities:translations:create -i en.yaml - - ┌───┬─────────────────────────────┬─────────┬──────────┐ - │ # │ Id │ Version │ Status │ - ├───┼─────────────────────────────┼─────────┼──────────┤ - │ 1 │ custom1.outputModulation │ 1 │ proposed │ - │ 2 │ custom1.outputVoltage │ 1 │ proposed │ - └───┴─────────────────────────────┴─────────┴──────────┘ - - ? Enter id or index 1 - - tag: en - label: Output Modulation - attributes: - outputModulation: - label: Output Modulation - displayTemplate: 'The {{attribute}} of {{device.label}} is {{value}}' - i18n: - value: - 50hz: - label: 50 Hz - 60hz: - label: 60 Hz - commands: - setOutputModulation: - label: Set Output Modulation - arguments: - outputModulation: - label: Output Modulation -``` - -_See code: [src/commands/capabilities/translations/create.ts](https://github.com/SmartThingsCommunity/smartthings-cli/blob/@smartthings/cli@1.7.0/packages/cli/src/commands/capabilities/translations/create.ts)_ - -## `smartthings capabilities:translations:update [ID] [VERSION]` - -update a capability translation - -``` -USAGE - $ smartthings capabilities:translations:update [ID] [VERSION] [-h] [-p ] [-t ] [--language ] [-O ] [-j] - [-y] [-i ] [-o ] [-d] - -ARGUMENTS - ID the capability id - VERSION the capability version - -FLAGS - -O, --organization= the organization ID to use for this command - -d, --dry-run produce JSON but don't actually submit - -COMMON FLAGS - -h, --help Show CLI help. - -i, --input= specify input file - -j, --json use JSON format of input and/or output - -o, --output= specify output file - -p, --profile= [default: default] configuration profile - -t, --token= the auth token to use - -y, --yaml use YAML format of input and/or output - --language= ISO language code or "NONE" to not specify a language. Defaults to the OS locale - -DESCRIPTION - update a capability translation - - For API information, see: - - https://developer.smartthings.com/docs/api/public/#operation/updateCapabilityLocalization - -EXAMPLES - $ smartthings capabilities:translations:update custom1.outputModulation 1 -i en.yaml - - tag: en - label: Output Modulation - attributes: - outputModulation: - label: Output Modulation - displayTemplate: 'The {{attribute}} of {{device.label}} is {{value}}' - i18n: - value: - 50hz: - label: 50 Hz - 60hz: - label: 60 Hz - commands: - setOutputModulation: - label: Set Output Modulation - arguments: - outputModulation: - label: Output Modulation - - $ smartthings capabilities:translations:update -i en.yaml - - ┌───┬─────────────────────────────┬─────────┬──────────┐ - │ # │ Id │ Version │ Status │ - ├───┼─────────────────────────────┼─────────┼──────────┤ - │ 1 │ custom1.outputModulation │ 1 │ proposed │ - │ 2 │ custom1.outputVoltage │ 1 │ proposed │ - └───┴─────────────────────────────┴─────────┴──────────┘ - - ? Enter id or index 1 - - tag: en - label: Output Modulation - attributes: - outputModulation: - label: Output Modulation - displayTemplate: 'The {{attribute}} of {{device.label}} is {{value}}' - i18n: - value: - 50hz: - label: 50 Hz - 60hz: - label: 60 Hz - commands: - setOutputModulation: - label: Set Output Modulation - arguments: - outputModulation: - label: Output Modulation -``` - -_See code: [src/commands/capabilities/translations/update.ts](https://github.com/SmartThingsCommunity/smartthings-cli/blob/@smartthings/cli@1.7.0/packages/cli/src/commands/capabilities/translations/update.ts)_ - -## `smartthings capabilities:translations:upsert [ID] [VERSION]` - -create or update a capability translation - -``` -USAGE - $ smartthings capabilities:translations:upsert [ID] [VERSION] [-h] [-p ] [-t ] [--language ] [-O ] [-j] - [-y] [-i ] [-o ] [-d] - -ARGUMENTS - ID the capability id - VERSION the capability version - -FLAGS - -O, --organization= the organization ID to use for this command - -d, --dry-run produce JSON but don't actually submit - -COMMON FLAGS - -h, --help Show CLI help. - -i, --input= specify input file - -j, --json use JSON format of input and/or output - -o, --output= specify output file - -p, --profile= [default: default] configuration profile - -t, --token= the auth token to use - -y, --yaml use YAML format of input and/or output - --language= ISO language code or "NONE" to not specify a language. Defaults to the OS locale - -DESCRIPTION - create or update a capability translation - - For API information, see: - - https://developer.smartthings.com/docs/api/public/#operation/updateCapabilityLocalization, - https://developer.smartthings.com/docs/api/public/#operation/createCapabilityLocalization - -EXAMPLES - $ smartthings capabilities:translations:upsert custom1.outputModulation 1 -i en.yaml - - tag: en - label: Output Modulation - attributes: - outputModulation: - label: Output Modulation - displayTemplate: 'The {{attribute}} of {{device.label}} is {{value}}' - i18n: - value: - 50hz: - label: 50 Hz - 60hz: - label: 60 Hz - commands: - setOutputModulation: - label: Set Output Modulation - arguments: - outputModulation: - label: Output Modulation - - $ smartthings capabilities:translations:upsert -i en.yaml - - ┌───┬─────────────────────────────┬─────────┬──────────┐ - │ # │ Id │ Version │ Status │ - ├───┼─────────────────────────────┼─────────┼──────────┤ - │ 1 │ custom1.outputModulation │ 1 │ proposed │ - │ 2 │ custom1.outputVoltage │ 1 │ proposed │ - └───┴─────────────────────────────┴─────────┴──────────┘ - - ? Enter id or index 1 - - tag: en - label: Output Modulation - attributes: - outputModulation: - label: Output Modulation - displayTemplate: 'The {{attribute}} of {{device.label}} is {{value}}' - i18n: - value: - 50hz: - label: 50 Hz - 60hz: - label: 60 Hz - commands: - setOutputModulation: - label: Set Output Modulation - arguments: - outputModulation: - label: Output Modulation -``` - -_See code: [src/commands/capabilities/translations/upsert.ts](https://github.com/SmartThingsCommunity/smartthings-cli/blob/@smartthings/cli@1.7.0/packages/cli/src/commands/capabilities/translations/upsert.ts)_ - -## `smartthings capabilities:update [ID] [VERSION]` - -update a capability - -``` -USAGE - $ smartthings capabilities:update [ID] [VERSION] [-h] [-p ] [-t ] [--language ] [-O ] [-j] - [-y] [-i ] [-o ] [-d] - -ARGUMENTS - ID the capability id - VERSION the capability version - -FLAGS - -O, --organization= the organization ID to use for this command - -d, --dry-run produce JSON but don't actually submit - -COMMON FLAGS - -h, --help Show CLI help. - -i, --input= specify input file - -j, --json use JSON format of input and/or output - -o, --output= specify output file - -p, --profile= [default: default] configuration profile - -t, --token= the auth token to use - -y, --yaml use YAML format of input and/or output - --language= ISO language code or "NONE" to not specify a language. Defaults to the OS locale - -DESCRIPTION - update a capability - - For API information, see: - - https://developer.smartthings.com/docs/api/public/#operation/updateCapability -``` - -_See code: [src/commands/capabilities/update.ts](https://github.com/SmartThingsCommunity/smartthings-cli/blob/@smartthings/cli@1.7.0/packages/cli/src/commands/capabilities/update.ts)_ - -## `smartthings config [NAME]` - -list config file entries - -``` -USAGE - $ smartthings config [NAME] [-h] [-p ] [-j] [-y] [-o ] [-v] - -ARGUMENTS - NAME the config name - -FLAGS - -v, --verbose Include additional data in table output - -COMMON FLAGS - -h, --help Show CLI help. - -j, --json use JSON format of input and/or output - -o, --output= specify output file - -p, --profile= [default: default] configuration profile - -y, --yaml use YAML format of input and/or output - -DESCRIPTION - list config file entries -``` - -_See code: [src/commands/config.ts](https://github.com/SmartThingsCommunity/smartthings-cli/blob/@smartthings/cli@1.7.0/packages/cli/src/commands/config.ts)_ - -## `smartthings config:reset` - -clear saved answers to questions - -``` -USAGE - $ smartthings config:reset [-h] [-p ] - -COMMON FLAGS - -h, --help Show CLI help. - -p, --profile= [default: default] configuration profile - -DESCRIPTION - clear saved answers to questions - - The CLI will occasionally ask you if you want it to remember the answer to a question, such as "Which hub do you want - to use?" You can use this command to clear those answers. -``` - -_See code: [src/commands/config/reset.ts](https://github.com/SmartThingsCommunity/smartthings-cli/blob/@smartthings/cli@1.7.0/packages/cli/src/commands/config/reset.ts)_ - -## `smartthings devicepreferences [IDORINDEX]` - -list device preferences or get information for a specific device preference - -``` -USAGE - $ smartthings devicepreferences [IDORINDEX] [-h] [-p ] [-t ] [--language ] [-O ] [-j] - [-y] [-o ] [-A] [-n ] [-s] - -ARGUMENTS - IDORINDEX device preference id or index - -FLAGS - -A, --all-organizations include entities from all organizations the user belongs to - -O, --organization= the organization ID to use for this command - -n, --namespace= a specific namespace to query; will use all by default - -s, --standard show standard SmartThings device preferences - -COMMON FLAGS - -h, --help Show CLI help. - -j, --json use JSON format of input and/or output - -o, --output= specify output file - -p, --profile= [default: default] configuration profile - -t, --token= the auth token to use - -y, --yaml use YAML format of input and/or output - --language= ISO language code or "NONE" to not specify a language. Defaults to the OS locale - -DESCRIPTION - list device preferences or get information for a specific device preference - - For API information, see: - - https://developer.smartthings.com/docs/api/public/#operation/listPreferences, - https://developer.smartthings.com/docs/api/public/#operation/getPreferenceById - -EXAMPLES - list all device preferences, sorted by title - - $ smartthings devicepreferences - - display details for preference with specified id - - $ smartthings devicepreferences motionSensitivity - - display details for second item in list of preferences when sorted by title - - $ smartthings devicepreferences 2 - - display details for third preference as YAML - - $ smartthings devicepreferences 3 -y - - write details as JSON for third preference to dp.json - - $ smartthings devicepreferences 3 -o dp.json -``` - -_See code: [src/commands/devicepreferences.ts](https://github.com/SmartThingsCommunity/smartthings-cli/blob/@smartthings/cli@1.7.0/packages/cli/src/commands/devicepreferences.ts)_ - -## `smartthings devicepreferences:create` - -create a device preference - -``` -USAGE - $ smartthings devicepreferences:create [-h] [-p ] [-t ] [--language ] [-O ] [-j] [-y] [-i - ] [-o ] [-d] - -FLAGS - -O, --organization= the organization ID to use for this command - -d, --dry-run produce JSON but don't actually submit - -COMMON FLAGS - -h, --help Show CLI help. - -i, --input= specify input file - -j, --json use JSON format of input and/or output - -o, --output= specify output file - -p, --profile= [default: default] configuration profile - -t, --token= the auth token to use - -y, --yaml use YAML format of input and/or output - --language= ISO language code or "NONE" to not specify a language. Defaults to the OS locale - -DESCRIPTION - create a device preference - - For API information, see: - - https://developer.smartthings.com/docs/api/public/#operation/createPreference - -EXAMPLES - create a new device preference by answering questions - - $ smartthings devicepreferences:create - - generate a device preference by answering questions but do not actually create it - - $ smartthings devicepreferences:create -d - - create a new device preference defined by the file dp.json - - $ smartthings devicepreferences:create -i dp.json - - create a new device preference defined by the file dp.json and write the results to dp - saved.json - - $ smartthings devicepreferences:create - i dp.json - o dp - saved.json -``` - -_See code: [src/commands/devicepreferences/create.ts](https://github.com/SmartThingsCommunity/smartthings-cli/blob/@smartthings/cli@1.7.0/packages/cli/src/commands/devicepreferences/create.ts)_ - -## `smartthings devicepreferences:translations [PREFERENCEID] [TAG]` - -get translated device preference values in a desired locale - -``` -USAGE - $ smartthings devicepreferences:translations [PREFERENCEID] [TAG] [-h] [-p ] [-t ] [--language ] [-O ] - [-j] [-y] [-o ] - -ARGUMENTS - PREFERENCEID device preference id or index - TAG the locale tag - -FLAGS - -O, --organization= the organization ID to use for this command - -COMMON FLAGS - -h, --help Show CLI help. - -j, --json use JSON format of input and/or output - -o, --output= specify output file - -p, --profile= [default: default] configuration profile - -t, --token= the auth token to use - -y, --yaml use YAML format of input and/or output - --language= ISO language code or "NONE" to not specify a language. Defaults to the OS locale - -DESCRIPTION - get translated device preference values in a desired locale - -EXAMPLES - answer a series of questions to choose device preference and list locales - - $ smartthings devicepreferences:translation - - list locales for a specific device preference ID - - $ smartthings devicepreferences:translations motionSensitivity - - specify device preference ID and locale to get translated device preference values - - $ smartthings devicepreferences:translations motionSensitivity ko -``` - -_See code: [src/commands/devicepreferences/translations.ts](https://github.com/SmartThingsCommunity/smartthings-cli/blob/@smartthings/cli@1.7.0/packages/cli/src/commands/devicepreferences/translations.ts)_ - -## `smartthings devicepreferences:translations:create [PREFERENCEID]` - -create a device preference translation - -``` -USAGE - $ smartthings devicepreferences:translations:create [PREFERENCEID] [-h] [-p ] [-t ] [--language ] [-O ] [-j] - [-y] [-i ] [-o ] [-d] - -ARGUMENTS - PREFERENCEID device preference id or index - -FLAGS - -O, --organization= the organization ID to use for this command - -d, --dry-run produce JSON but don't actually submit - -COMMON FLAGS - -h, --help Show CLI help. - -i, --input= specify input file - -j, --json use JSON format of input and/or output - -o, --output= specify output file - -p, --profile= [default: default] configuration profile - -t, --token= the auth token to use - -y, --yaml use YAML format of input and/or output - --language= ISO language code or "NONE" to not specify a language. Defaults to the OS locale - -DESCRIPTION - create a device preference translation - -EXAMPLES - create a device preference translation as defined in the file preferenceTranslation.json - - $ smartthings devicepreferences:translations:create -i preferenceTranslation.json -``` - -_See code: [src/commands/devicepreferences/translations/create.ts](https://github.com/SmartThingsCommunity/smartthings-cli/blob/@smartthings/cli@1.7.0/packages/cli/src/commands/devicepreferences/translations/create.ts)_ - -## `smartthings devicepreferences:translations:update [PREFERENCEID]` - -update a device preference translation - -``` -USAGE - $ smartthings devicepreferences:translations:update [PREFERENCEID] [-h] [-p ] [-t ] [--language ] [-O ] [-j] - [-y] [-i ] [-o ] [-d] - -ARGUMENTS - PREFERENCEID device preference id or index - -FLAGS - -O, --organization= the organization ID to use for this command - -d, --dry-run produce JSON but don't actually submit - -COMMON FLAGS - -h, --help Show CLI help. - -i, --input= specify input file - -j, --json use JSON format of input and/or output - -o, --output= specify output file - -p, --profile= [default: default] configuration profile - -t, --token= the auth token to use - -y, --yaml use YAML format of input and/or output - --language= ISO language code or "NONE" to not specify a language. Defaults to the OS locale - -DESCRIPTION - update a device preference translation - -EXAMPLES - select a translation from a list and update it with the data in the file preferenceTranslation.json - - $ smartthings devicepreferences:translations:update -i preferenceTranslation.json -``` - -_See code: [src/commands/devicepreferences/translations/update.ts](https://github.com/SmartThingsCommunity/smartthings-cli/blob/@smartthings/cli@1.7.0/packages/cli/src/commands/devicepreferences/translations/update.ts)_ - -## `smartthings devicepreferences:update [ID]` - -update a device preference - -``` -USAGE - $ smartthings devicepreferences:update [ID] [-h] [-p ] [-t ] [--language ] [-O ] [-j] [-y] [-i - ] [-o ] [-d] - -ARGUMENTS - ID the device preference id - -FLAGS - -O, --organization= the organization ID to use for this command - -d, --dry-run produce JSON but don't actually submit - -COMMON FLAGS - -h, --help Show CLI help. - -i, --input= specify input file - -j, --json use JSON format of input and/or output - -o, --output= specify output file - -p, --profile= [default: default] configuration profile - -t, --token= the auth token to use - -y, --yaml use YAML format of input and/or output - --language= ISO language code or "NONE" to not specify a language. Defaults to the OS locale - -DESCRIPTION - update a device preference - - For API information, see: - - https://developer.smartthings.com/docs/api/public/#operation/updatePreferenceById - -EXAMPLES - select a device preference from a list and update it with data from dp.json - - $ smartthings devicepreferences:update -i dp.json - - update specified device preference with data from dp.yaml - - $ smartthings devicepreferences:update -i dp.yaml motionSensitivity -``` - -_See code: [src/commands/devicepreferences/update.ts](https://github.com/SmartThingsCommunity/smartthings-cli/blob/@smartthings/cli@1.7.0/packages/cli/src/commands/devicepreferences/update.ts)_ - -## `smartthings deviceprofiles [ID]` - -list all device profiles available in a user account or retrieve a single profile - -``` -USAGE - $ smartthings deviceprofiles [ID] [-h] [-p ] [-t ] [--language ] [-O ] [-j] [-y] [-o - ] [-A] [-v] - -ARGUMENTS - ID device profile to retrieve; UUID or the number of the profile from list - -FLAGS - -A, --all-organizations include entities from all organizations the user belongs to - -O, --organization= the organization ID to use for this command - -v, --verbose include presentationId and manufacturerName in list output - -COMMON FLAGS - -h, --help Show CLI help. - -j, --json use JSON format of input and/or output - -o, --output= specify output file - -p, --profile= [default: default] configuration profile - -t, --token= the auth token to use - -y, --yaml use YAML format of input and/or output - --language= ISO language code or "NONE" to not specify a language. Defaults to the OS locale - -DESCRIPTION - list all device profiles available in a user account or retrieve a single profile - - For API information, see: - - https://developer.smartthings.com/docs/api/public/#operation/listDeviceProfiles, - https://developer.smartthings.com/docs/api/public/#operation/getDeviceProfile - -EXAMPLES - $ smartthings deviceprofiles # list all device profiles - - $ smartthings deviceprofiles bb0fdc5-...-a8bd2ea # show device profile with the specified UUID - - $ smartthings deviceprofiles 2 # show the second device profile in the list - - $ smartthings deviceprofiles 3 -j # show the profile in JSON format - - $ smartthings deviceprofiles 5 -y # show the profile in YAML format - - $ smartthings deviceprofiles 4 -j -o profile.json # write the profile to the file "profile.json" -``` - -_See code: [src/commands/deviceprofiles.ts](https://github.com/SmartThingsCommunity/smartthings-cli/blob/@smartthings/cli@1.7.0/packages/cli/src/commands/deviceprofiles.ts)_ - -## `smartthings deviceprofiles:create` - -create a new device profile - -``` -USAGE - $ smartthings deviceprofiles:create [-h] [-p ] [-t ] [--language ] [-O ] [-j] [-y] [-i - ] [-o ] [-d] - -FLAGS - -O, --organization= the organization ID to use for this command - -d, --dry-run produce JSON but don't actually submit - -COMMON FLAGS - -h, --help Show CLI help. - -i, --input= specify input file - -j, --json use JSON format of input and/or output - -o, --output= specify output file - -p, --profile= [default: default] configuration profile - -t, --token= the auth token to use - -y, --yaml use YAML format of input and/or output - --language= ISO language code or "NONE" to not specify a language. Defaults to the OS locale - -DESCRIPTION - create a new device profile - - Creates a new device profile. If a vid field is not present in the meta then a default device presentation will be - created for this profile and the vid set to reference it. - - For API information, see: - - https://developer.smartthings.com/docs/api/public/#operation/createDeviceProfile - -EXAMPLES - $ smartthings deviceprofiles:create -i myprofile.json # create a device profile from the JSON file definition - - $ smartthings deviceprofiles:create -i myprofile.yaml # create a device profile from the YAML file definition - - $ smartthings deviceprofiles:create # create a device profile with interactive dialog -``` - -_See code: [src/commands/deviceprofiles/create.ts](https://github.com/SmartThingsCommunity/smartthings-cli/blob/@smartthings/cli@1.7.0/packages/cli/src/commands/deviceprofiles/create.ts)_ - -## `smartthings deviceprofiles:delete [ID]` - -delete a device profile - -``` -USAGE - $ smartthings deviceprofiles:delete [ID] [-h] [-p ] [-t ] [--language ] [-O ] - -ARGUMENTS - ID Device profile UUID or number in the list - -FLAGS - -O, --organization= the organization ID to use for this command - -COMMON FLAGS - -h, --help Show CLI help. - -p, --profile= [default: default] configuration profile - -t, --token= the auth token to use - --language= ISO language code or "NONE" to not specify a language. Defaults to the OS locale - -DESCRIPTION - delete a device profile - - For API information, see: - - https://developer.smartthings.com/docs/api/public/#operation/deleteDeviceProfile - -EXAMPLES - $ smartthings deviceprofiles:delete 63b8c91e-9686-4c43-9afb-fbd9f77e3bb0 # delete profile with this UUID - - $ smartthings deviceprofiles:delete 5 # delete the 5th profile in the list -``` - -_See code: [src/commands/deviceprofiles/delete.ts](https://github.com/SmartThingsCommunity/smartthings-cli/blob/@smartthings/cli@1.7.0/packages/cli/src/commands/deviceprofiles/delete.ts)_ - -## `smartthings deviceprofiles:device-config [ID]` - -get the device configuration associated with a device profile - -``` -USAGE - $ smartthings deviceprofiles:device-config [ID] [-h] [-p ] [-t ] [--language ] [-O ] [-j] [-y] [-o - ] - -ARGUMENTS - ID device profile id or the number in list - -FLAGS - -O, --organization= the organization ID to use for this command - -COMMON FLAGS - -h, --help Show CLI help. - -j, --json use JSON format of input and/or output - -o, --output= specify output file - -p, --profile= [default: default] configuration profile - -t, --token= the auth token to use - -y, --yaml use YAML format of input and/or output - --language= ISO language code or "NONE" to not specify a language. Defaults to the OS locale - -DESCRIPTION - get the device configuration associated with a device profile - - For API information, see: - - https://developer.smartthings.com/docs/api/public/#operation/getDeviceProfile, - https://developer.smartthings.com/docs/api/public/#operation/getDeviceConfiguration -``` - -_See code: [src/commands/deviceprofiles/device-config.ts](https://github.com/SmartThingsCommunity/smartthings-cli/blob/@smartthings/cli@1.7.0/packages/cli/src/commands/deviceprofiles/device-config.ts)_ - -## `smartthings deviceprofiles:presentation [ID]` - -get the presentation associated with a device profile - -``` -USAGE - $ smartthings deviceprofiles:presentation [ID] [-h] [-p ] [-t ] [--language ] [-O ] [-j] [-y] [-o - ] - -ARGUMENTS - ID device profile UUID or the number of the profile from list - -FLAGS - -O, --organization= the organization ID to use for this command - -COMMON FLAGS - -h, --help Show CLI help. - -j, --json use JSON format of input and/or output - -o, --output= specify output file - -p, --profile= [default: default] configuration profile - -t, --token= the auth token to use - -y, --yaml use YAML format of input and/or output - --language= ISO language code or "NONE" to not specify a language. Defaults to the OS locale - -DESCRIPTION - get the presentation associated with a device profile - - For API information, see: - - https://developer.smartthings.com/docs/api/public/#operation/getDeviceProfile, - https://developer.smartthings.com/docs/api/public/#operation/getDevicePresentation - -EXAMPLES - $ smartthings deviceprofiles:presentation fd4adb7f-4a23-4134-9b39-05ed889a03cf - - $ smartthings deviceprofiles:presentation fd4adb7f-4a23-4134-9b39-05ed889a03cf --language=ko - - $ smartthings deviceprofiles:presentation fd4adb7f-4a23-4134-9b39-05ed889a03cf --language=NONE - - - - Specifying only the presentationId defaults to the "SmartThingsCommunity" manufacturer - - name and the language set for the computer's operating system. The language can be - - overridden by specifying an ISO language code. If "NONE" is specified for the language - - flag then no language header is specified in the API request -``` - -_See code: [src/commands/deviceprofiles/presentation.ts](https://github.com/SmartThingsCommunity/smartthings-cli/blob/@smartthings/cli@1.7.0/packages/cli/src/commands/deviceprofiles/presentation.ts)_ - -## `smartthings deviceprofiles:publish [ID]` - -publish a device profile (published profiles cannot be modified) - -``` -USAGE - $ smartthings deviceprofiles:publish [ID] [-h] [-p ] [-t ] [--language ] [-O ] [-j] [-y] [-o - ] - -ARGUMENTS - ID device profile id - -FLAGS - -O, --organization= the organization ID to use for this command - -COMMON FLAGS - -h, --help Show CLI help. - -j, --json use JSON format of input and/or output - -o, --output= specify output file - -p, --profile= [default: default] configuration profile - -t, --token= the auth token to use - -y, --yaml use YAML format of input and/or output - --language= ISO language code or "NONE" to not specify a language. Defaults to the OS locale - -DESCRIPTION - publish a device profile (published profiles cannot be modified) -``` - -_See code: [src/commands/deviceprofiles/publish.ts](https://github.com/SmartThingsCommunity/smartthings-cli/blob/@smartthings/cli@1.7.0/packages/cli/src/commands/deviceprofiles/publish.ts)_ - -## `smartthings deviceprofiles:translations [ID] [TAG]` - -get list of locales supported by the device profiles - -``` -USAGE - $ smartthings deviceprofiles:translations [ID] [TAG] [-h] [-p ] [-t ] [--language ] [-O ] [-j] [-y] - [-o ] [-v] - -ARGUMENTS - ID UUID or the number of the profile from list - TAG the locale tag or number of the tag from list - -FLAGS - -O, --organization= the organization ID to use for this command - -v, --verbose include list of locales in table output - -COMMON FLAGS - -h, --help Show CLI help. - -j, --json use JSON format of input and/or output - -o, --output= specify output file - -p, --profile= [default: default] configuration profile - -t, --token= the auth token to use - -y, --yaml use YAML format of input and/or output - --language= ISO language code or "NONE" to not specify a language. Defaults to the OS locale - -DESCRIPTION - get list of locales supported by the device profiles - -EXAMPLES - $ smartthings deviceprofiles:translations - - ┌────┬─────────────────────┬─────────────┬──────────────────────────────────────┐ - - │ # │ Name │ Status │ Id │ - - ├────┼─────────────────────┼─────────────┼──────────────────────────────────────┤ - - │ 1 │ Test Switch │ DEVELOPMENT │ 58e73d0c-b5a5-4814-b344-c10f4ff357bb │ - - │ 2 │ Two Channel Outlet │ DEVELOPMENT │ 3acbf2fc-6be2-4be0-aeb5-44759cbd66c2 │ - - └────┴─────────────────────┴─────────────┴──────────────────────────────────────┘ - - ? Select a Device Profile. 2 - - ┌───┬─────┐ - - │ # │ Tag │ - - ├───┼─────┤ - - │ 1 │ en │ - - │ 2 │ es │ - - └───┴─────┘ - - - - $ smartthings deviceprofiles:translations -v - - ┌────┬─────────────────────┬─────────────┬──────────────────────────────────────┬─────────┐ - - │ # │ Name │ Status │ Id │ Locales │ - - ├────┼─────────────────────┼─────────────┼──────────────────────────────────────┼─────────┤ - - │ 1 │ Test Switch │ DEVELOPMENT │ 58e73d0c-b5a5-4814-b344-c10f4ff357bb │ │ - - │ 2 │ Two Channel Outlet │ DEVELOPMENT │ 3acbf2fc-6be2-4be0-aeb5-44759cbd66c2 │ en, es │ - - └────┴─────────────────────┴─────────────┴──────────────────────────────────────┴─────────┘ - - ? Select a Device Profile. 2 - - ┌───┬─────┐ - - │ # │ Tag │ - - ├───┼─────┤ - - │ 1 │ en │ - - │ 2 │ es │ - - └───┴─────┘ - - - - $ smartthings deviceprofiles:translations 2 - - $ smartthings deviceprofiles:translations 3acbf2fc-6be2-4be0-aeb5-c10f4ff357bb - - ┌───┬─────┐ - - │ # │ Tag │ - - ├───┼─────┤ - - │ 1 │ en │ - - │ 2 │ es │ - - └───┴─────┘ - - - - $ smartthings deviceprofiles:translations 2 2 - - $ smartthings deviceprofiles:translations 2 en - - $ smartthings deviceprofiles:translations 3acbf2fc-6be2-4be0-aeb5-44759cbd66c2 en - - Tag: en - - ┌───────────┬────────────┬───────────────────────────────┐ - - │ Component │ Label │ Description │ - - ├───────────┼────────────┼───────────────────────────────┤ - - │ main │ Main Power │ Controls power to all outlets │ - - │ outlet1 │ Outlet One │ Switchable outlet 1 power │ - - │ outlet2 │ Outlet two │ Switchable outlet 1 power │ - - └───────────┴────────────┴───────────────────────────────┘ -``` - -_See code: [src/commands/deviceprofiles/translations.ts](https://github.com/SmartThingsCommunity/smartthings-cli/blob/@smartthings/cli@1.7.0/packages/cli/src/commands/deviceprofiles/translations.ts)_ - -## `smartthings deviceprofiles:translations:delete [ID] [TAG]` - -delete a device profile translation - -``` -USAGE - $ smartthings deviceprofiles:translations:delete [ID] [TAG] [-h] [-p ] [-t ] [--language ] [-O - ] - -ARGUMENTS - ID device profile UUID or number in the list - TAG the locale tag - -FLAGS - -O, --organization= the organization ID to use for this command - -COMMON FLAGS - -h, --help Show CLI help. - -p, --profile= [default: default] configuration profile - -t, --token= the auth token to use - --language= ISO language code or "NONE" to not specify a language. Defaults to the OS locale - -DESCRIPTION - delete a device profile translation - -EXAMPLES - $ smartthings deviceprofiles:translations:delete 3acbf2fc-6be2-4be0-aeb5-44759cbd66c2 en - - Device profile "3acbf2fc-6be2-4be0-aeb5-44759cbd66c2" translation "en" deleted - - - - $ smartthings deviceprofiles:translations:delete - - ┌────┬─────────────────────┬─────────────┬──────────────────────────────────────┐ - - │ # │ Name │ Status │ Id │ - - ├────┼─────────────────────┼─────────────┼──────────────────────────────────────┤ - - │ 1 │ Test Switch │ DEVELOPMENT │ 58e73d0c-b5a5-4814-b344-c10f4ff357bb │ - - │ 2 │ Two Channel Outlet │ DEVELOPMENT │ 3acbf2fc-6be2-4be0-aeb5-44759cbd66c2 │ - - └────┴─────────────────────┴─────────────┴──────────────────────────────────────┘ - - ? Enter id or index 2 - - ┌───┬─────┐ - - │ # │ Tag │ - - ├───┼─────┤ - - │ 1 │ en │ - - │ 2 │ es │ - - └───┴─────┘ - - ? Enter id or index 1 - - Device profile "3acbf2fc-6be2-4be0-aeb5-44759cbd66c2" translation "en" deleted -``` - -_See code: [src/commands/deviceprofiles/translations/delete.ts](https://github.com/SmartThingsCommunity/smartthings-cli/blob/@smartthings/cli@1.7.0/packages/cli/src/commands/deviceprofiles/translations/delete.ts)_ - -## `smartthings deviceprofiles:translations:upsert [ID]` - -create or update a device profile translation - -``` -USAGE - $ smartthings deviceprofiles:translations:upsert [ID] [-h] [-p ] [-t ] [--language ] [-O ] [-j] [-y] [-i - ] [-o ] [-d] - -ARGUMENTS - ID UUID or the number of the profile from list - -FLAGS - -O, --organization= the organization ID to use for this command - -d, --dry-run produce JSON but don't actually submit - -COMMON FLAGS - -h, --help Show CLI help. - -i, --input= specify input file - -j, --json use JSON format of input and/or output - -o, --output= specify output file - -p, --profile= [default: default] configuration profile - -t, --token= the auth token to use - -y, --yaml use YAML format of input and/or output - --language= ISO language code or "NONE" to not specify a language. Defaults to the OS locale - -DESCRIPTION - create or update a device profile translation - -EXAMPLES - $ smartthings deviceprofiles:translations:upsert 3acbf2fc-6be2-4be0-aeb5-44759cbd66c2 -i en.yaml - - tag: en - - components: - - main: - - label: Main Power - - description: Controls power to all outlets - - outlet1: - - label: Outlet One - - description: Switchable outlet 1 power - - outlet2: - - label: Outlet two - - description: Switchable outlet 1 power - - - - $ smartthings deviceprofiles:translations:upsert -i en.yaml - - ┌────┬─────────────────────┬─────────────┬──────────────────────────────────────┐ - - │ # │ Name │ Status │ Id │ - - ├────┼─────────────────────┼─────────────┼──────────────────────────────────────┤ - - │ 1 │ Test Switch │ DEVELOPMENT │ 58e73d0c-b5a5-4814-b344-c10f4ff357bb │ - - │ 2 │ Two Channel Outlet │ DEVELOPMENT │ 3acbf2fc-6be2-4be0-aeb5-44759cbd66c2 │ - - └────┴─────────────────────┴─────────────┴──────────────────────────────────────┘ - - ? Enter id or index 2 - - tag: en - - components: - - main: - - label: Main Power - - description: Controls power to all outlets - - outlet1: - - label: Outlet One - - description: Switchable outlet 1 power - - outlet2: - - label: Outlet two - - description: Switchable outlet 1 power -``` - -_See code: [src/commands/deviceprofiles/translations/upsert.ts](https://github.com/SmartThingsCommunity/smartthings-cli/blob/@smartthings/cli@1.7.0/packages/cli/src/commands/deviceprofiles/translations/upsert.ts)_ - -## `smartthings deviceprofiles:update [ID]` - -update a device profile - -``` -USAGE - $ smartthings deviceprofiles:update [ID] [-h] [-p ] [-t ] [--language ] [-O ] [-j] [-y] [-i - ] [-o ] [-d] - -ARGUMENTS - ID device profile UUID or number in the list - -FLAGS - -O, --organization= the organization ID to use for this command - -d, --dry-run produce JSON but don't actually submit - -COMMON FLAGS - -h, --help Show CLI help. - -i, --input= specify input file - -j, --json use JSON format of input and/or output - -o, --output= specify output file - -p, --profile= [default: default] configuration profile - -t, --token= the auth token to use - -y, --yaml use YAML format of input and/or output - --language= ISO language code or "NONE" to not specify a language. Defaults to the OS locale - -DESCRIPTION - update a device profile - - For API information, see: - - https://developer.smartthings.com/docs/api/public/#operation/updateDeviceProfile -``` - -_See code: [src/commands/deviceprofiles/update.ts](https://github.com/SmartThingsCommunity/smartthings-cli/blob/@smartthings/cli@1.7.0/packages/cli/src/commands/deviceprofiles/update.ts)_ - -## `smartthings deviceprofiles:view [ID]` - -show device profile and device configuration in a single, consolidated view - -``` -USAGE - $ smartthings deviceprofiles:view [ID] [-h] [-p ] [-t ] [--language ] [-O ] [-j] [-y] [-o - ] - -ARGUMENTS - ID device profile UUID or the number from list - -FLAGS - -O, --organization= the organization ID to use for this command - -COMMON FLAGS - -h, --help Show CLI help. - -j, --json use JSON format of input and/or output - -o, --output= specify output file - -p, --profile= [default: default] configuration profile - -t, --token= the auth token to use - -y, --yaml use YAML format of input and/or output - --language= ISO language code or "NONE" to not specify a language. Defaults to the OS locale - -DESCRIPTION - show device profile and device configuration in a single, consolidated view - - For API information, see: - - https://developer.smartthings.com/docs/api/public/#operation/getDeviceProfile, getDeviceConfiguration -``` - -_See code: [src/commands/deviceprofiles/view.ts](https://github.com/SmartThingsCommunity/smartthings-cli/blob/@smartthings/cli@1.7.0/packages/cli/src/commands/deviceprofiles/view.ts)_ - -## `smartthings deviceprofiles:view:create` - -create a new device profile and device configuration - -``` -USAGE - $ smartthings deviceprofiles:view:create [-h] [-p ] [-t ] [--language ] [-O ] [-j] [-y] [-i - ] [-o ] [-d] - -FLAGS - -O, --organization= the organization ID to use for this command - -d, --dry-run produce JSON but don't actually submit - -COMMON FLAGS - -h, --help Show CLI help. - -i, --input= specify input file - -j, --json use JSON format of input and/or output - -o, --output= specify output file - -p, --profile= [default: default] configuration profile - -t, --token= the auth token to use - -y, --yaml use YAML format of input and/or output - --language= ISO language code or "NONE" to not specify a language. Defaults to the OS locale - -DESCRIPTION - create a new device profile and device configuration - - Creates a new device profile and device configuration. Unlike deviceprofiles:create, this command accepts a - consolidated object that can include a device configuration in a property named "view". - - For API information, see: - - https://developer.smartthings.com/docs/api/public/#operation/createDeviceProfile, - https://developer.smartthings.com/docs/api/public/#operation/createDeviceConfiguration, - https://developer.smartthings.com/docs/api/public/#operation/updateDeviceProfile, - https://developer.smartthings.com/docs/api/public/#operation/generateDeviceConfig - -EXAMPLES - $ smartthings deviceprofiles:view:create -i test.json - - - - This test.json file defines a switch that cannot be controlled by the automations builder: - - - - name: Test Switch - - components: - - - id: main - - capabilities: - - - id: switch - - view: - - dashboard: - - states: - - - capability: switch - - actions: - - - capability: switch - - detailView: - - - capability: switch - - automation: - - conditions: - - - capability: switch -``` - -_See code: [src/commands/deviceprofiles/view/create.ts](https://github.com/SmartThingsCommunity/smartthings-cli/blob/@smartthings/cli@1.7.0/packages/cli/src/commands/deviceprofiles/view/create.ts)_ - -## `smartthings deviceprofiles:view:update [ID]` - -update a device profile and configuration - -``` -USAGE - $ smartthings deviceprofiles:view:update [ID] [-h] [-p ] [-t ] [--language ] [-O ] [-j] [-y] [-i - ] [-o ] [-d] - -ARGUMENTS - ID device profile id - -FLAGS - -O, --organization= the organization ID to use for this command - -d, --dry-run produce JSON but don't actually submit - -COMMON FLAGS - -h, --help Show CLI help. - -i, --input= specify input file - -j, --json use JSON format of input and/or output - -o, --output= specify output file - -p, --profile= [default: default] configuration profile - -t, --token= the auth token to use - -y, --yaml use YAML format of input and/or output - --language= ISO language code or "NONE" to not specify a language. Defaults to the OS locale - -DESCRIPTION - update a device profile and configuration - - Updates a device profile and device configuration and sets the vid of the profile to the vid of the updated - configuration. Unlike deviceprofiles:update this command accepts a consolidated object that can include a device - configuration in a property named "view". - - For API information, see: - - https://developer.smartthings.com/docs/api/public/#operation/createDeviceConfiguration, - https://developer.smartthings.com/docs/api/public/#operation/updateDeviceProfile, - https://developer.smartthings.com/docs/api/public/#operation/generateDeviceConfig - -EXAMPLES - $ smartthings deviceprofiles:view:update 84042863-0d34-4c5c-b497-808daf230787 -i test.json - - - - This test.json file adds the powerMeter capability to the device and makes it available in - - the device detail view but not the rule builder: - - - - components: - - - id: main - - capabilities: - - - id: switch - - - id: powerMeter - - view: - - dashboard: - - states: - - - capability: switch - - actions: - - - capability: switch - - detailView: - - - capability: switch - - - capability: powerMeter - - automation: - - conditions: - - - capability: switch -``` - -_See code: [src/commands/deviceprofiles/view/update.ts](https://github.com/SmartThingsCommunity/smartthings-cli/blob/@smartthings/cli@1.7.0/packages/cli/src/commands/deviceprofiles/view/update.ts)_ - -## `smartthings devices [ID]` - -list all devices available in a user account or retrieve a single device - -``` -USAGE - $ smartthings devices [ID] [-h] [-p ] [-t ] [--language ] [-j] [-y] [-o ] [-l - ] [-C and|or -c ] [-d ] [-a ] [-s] [-H] [--type BLE|BLE_D2D|DTH|ENDPOINT_APP|GROUP|HUB|I - R|IR_OCF|LAN|MATTER|MOBILE|MQTT|OCF|PENGYOU|SHP|VIDEO|VIPER|VIRTUAL|WATCH|ZIGBEE|ZWAVE|EDGE_CHILD] [-v] - -ARGUMENTS - ID device to retrieve; UUID or the number of the device from list - -FLAGS - -C, --capabilities-mode=