AddDeviceCodeClient
Adds a new client using grant type 'device code'.
Examples
Interactive: asks for the client secret twice, without echoing it:
octo-cli -c AddDeviceCodeClient -id "my-device" -n "My IoT Device"
Automation: pipe the secret in (e.g. from a secret store):
octo-cli -c AddDeviceCodeClient `
-id "my-device" `
-n "My IoT Device" `
-ss
Options
| Short | Long | Required | Description |
|---|---|---|---|
-id | --clientId | yes | ServiceClient ID, must be unique |
-n | --name | yes | Display name of client used for grants |
-s | --secret | no | Deprecated: client secret used for client credential authentication. A value on the command line ends up in the shell history and the process list. Omit it to be prompted (hidden input), or use --secret-stdin or the environment variable OCTO_CLI_NEW_CLIENT_SECRET. |
-ss | --secret-stdin | no | Read the client secret from standard input (one value; a trailing line break is removed) |
Notes
The client secret is read from a hidden prompt, from standard input (--secret-stdin) or from the environment variable OCTO_CLI_NEW_CLIENT_SECRET, so it does not end up in the shell history or the process list. -s still works in this release but logs a deprecation warning and will be removed. OCTO_CLI_CLIENT_SECRET is not read here: it is the secret octo-cli itself logs in with.