Releases: reubenmiller/go-c8y-cli
Cumulocity CLI 2.52.3
What's Changed
- fix: Installation on powershell 5.x on Windows by @reubenmiller in #544
Full Changelog: v2.52.2...v2.52.3
Cumulocity CLI 2.52.2
What's Changed
- feat(remoteaccess): allow users to control the preferred authentication type by @reubenmiller in #535
- feat(templates): extend jsonnet recurse functions to support user defined predicates and transform functions by @reubenmiller in #541
- fix(createHostedApplication): fix zipping of a hosted webapp where the folder would sometimes be included by @reubenmiller in #536
- fix(csv): don't convert 0-1 integers to boolean by @reubenmiller in #540
- fix(session): respect legacy session mode in existing sessions by @reubenmiller in #542
Full Changelog: v2.52.1...v2.52.2
Cumulocity CLI 2.52.1
What's Changed
Note This release includes some changes to the shell helper functions so you may need to reload the terminal if you experience unexpected errors.
New features
Session: Session mode mismatch prompt in #525
Users are now prompted to confirm commands which are normally disabled rather than immediately failing. For instance, if you're using session which is normally read-only as it is for a production Cumulocity instance, if you try to use a command like c8y inventory create, then you'll be presented with a warning that the command is normally disabled, by given the chance to confirm the action, without having to change the session mode and re-run the command.
Example
c8y inventory createOutput
Session Mode Mismatch This command (c8y inventory create) is disabled in the session
Check the following session information and then confirm the type of action.
--------------------- Cumulocity Session ---------------------
source: /Users/example/.cumulocity/example.c8y.io-example.json
mode : prod (allowed commands: read)
host : example.c8y.io
tenant : t1234
version : 2025.198.0
username : example
Tip You can permanently change the session mode by using either:
* set-session --mode dev (set the mode when selecting the session)
* c8y settings update mode dev (set the default mode for the current session (requires reloading the session))
* c8y inventory create --sessionMode dev (set mode for a single command)
? Confirm the action to continue [Use arrows to move, type to filter]
> cancel
create
Session: Set session mode when activating in #521, #528
The session mode (e.g. dev/qual/prod) can now be set when activating a session which overrides the default session mode. This allows you to more easily set the session if you know ahead of time that you wish to enable additional commands which are normally disabled.
set-session --mode devOr you can ask to be prompted for a value using:
set-session --mode promptSession: Warn users about invalid session set/login usage in #516
Warn users if they are using c8y sessions login or c8y sessions set as it will have no effect on the active session. The warning message includes instructions on how to use the set-session helper function, or how to set the session using native shell commands (e.g. eval "$(c8y sessions login)")
Example
c8y sessions login
Output
!!! You shouldn't run 'c8y session login' directly as it will have no effect on your current session.
Instead, you will need to use the 'set-session' helper function, or if you can't use the helper function, then run:
# zsh/bash/sh
eval "$(c8y sessions login)"
# fish
c8y sessions login | source
# powershell
c8y sessions login | Out-String | Invoke-Expression
...dry run format: support multipart/form-data requests for curl dry run in #512
Extend the curl dry run output (--dryFormat curl) to also support multipart/form-data requests which was previously only partially shown. The commands are translated to reference files rather tha the raw multipart/form-data requests to align with curl usage.
Example
c8y deviceregistration register-ca --id "tmp01" --one-time-password "LookHowSecretThisIs1337" --dry --dryFormat curlOutput
##### curl (shell)
```sh
curl -X POST 'https://{host}/devicecontrol/bulkNewDeviceRequests' -H 'Accept: application/json' -H 'Authorization: Bearer {token}' -F '[email protected]'
```
##### curl (PowerShell)
```powershell
curl -X POST 'https://{host}/devicecontrol/bulkNewDeviceRequests' -H 'Accept: application/json' -H 'Authorization: Bearer {token}' -F '[email protected]'
```
##### file: input1.txt
```text/plain
ID AUTH_TYPE ENROLLMENT_OTP NAME TYPE IDTYPE com_cumulocity_model_Agent.active
tmp01 CERTIFICATES LookHowSecretThisIs1337 tmp01 thin-edge.io c8y_Serial true
```Minor improvements
-
feat: Remove shell aliases to avoid clashing with other cli tools by @reubenmiller in #507
-
feat: support complex non-json output from jsonnet templates by @reubenmiller in #510
-
feat: improve shell detect when installing and loading shell helpers by @reubenmiller in #515
-
feat: auto detect more ci environments like Jenkins, TeamCity, TaskCluster and dsari by @reubenmiller in #526
-
feat(beta feature): support external commands to prompt for the encryption passphrase by @reubenmiller in #518
-
feat(beta feature): inject secrets from the pin entry app when calling an external provider by @reubenmiller in #519
Fixes
-
fix(registration): add confirmation prompts to device registration commands by @reubenmiller in #508
-
fix(certificate-authority): add confirmation prompts to certificate-authority commands by @reubenmiller in #509
-
fix: update invalid doc string references to OAUTH_INTERNAL by @reubenmiller in #520
Full Changelog: v2.51.5...v2.52.0
Cumulocity CLI 2.52.0
What's Changed
New features
Session: Session mode mismatch prompt in #525
Users are now prompted to confirm commands which are normally disabled rather than immediately failing. For instance, if you're using session which is normally read-only as it is for a production Cumulocity instance, if you try to use a command like c8y inventory create, then you'll be presented with a warning that the command is normally disabled, by given the chance to confirm the action, without having to change the session mode and re-run the command.
Example
c8y inventory createOutput
Session Mode Mismatch This command (c8y inventory create) is disabled in the session
Check the following session information and then confirm the type of action.
--------------------- Cumulocity Session ---------------------
source: /Users/example/.cumulocity/example.c8y.io-example.json
mode : prod (allowed commands: read)
host : example.c8y.io
tenant : t1234
version : 2025.198.0
username : example
Tip You can permanently change the session mode by using either:
* set-session --mode dev (set the mode when selecting the session)
* c8y settings update mode dev (set the default mode for the current session (requires reloading the session))
* c8y inventory create --sessionMode dev (set mode for a single command)
? Confirm the action to continue [Use arrows to move, type to filter]
> cancel
create
Session: Set session mode when activating in #521, #528
The session mode (e.g. dev/qual/prod) can now be set when activating a session which overrides the default session mode. This allows you to more easily set the session if you know ahead of time that you wish to enable additional commands which are normally disabled.
set-session --mode devOr you can ask to be prompted for a value using:
set-session --mode promptSession: Warn users about invalid session set/login usage in #516
Warn users if they are using c8y sessions login or c8y sessions set as it will have no effect on the active session. The warning message includes instructions on how to use the set-session helper function, or how to set the session using native shell commands (e.g. eval "$(c8y sessions login)")
Example
c8y sessions login
Output
!!! You shouldn't run 'c8y session login' directly as it will have no effect on your current session.
Instead, you will need to use the 'set-session' helper function, or if you can't use the helper function, then run:
# zsh/bash/sh
eval "$(c8y sessions login)"
# fish
c8y sessions login | source
# powershell
c8y sessions login | Out-String | Invoke-Expression
...dry run format: support multipart/form-data requests for curl dry run in #512
Extend the curl dry run output (--dryFormat curl) to also support multipart/form-data requests which was previously only partially shown. The commands are translated to reference files rather tha the raw multipart/form-data requests to align with curl usage.
Example
c8y deviceregistration register-ca --id "tmp01" --one-time-password "LookHowSecretThisIs1337" --dry --dryFormat curlOutput
##### curl (shell)
```sh
curl -X POST 'https://{host}/devicecontrol/bulkNewDeviceRequests' -H 'Accept: application/json' -H 'Authorization: Bearer {token}' -F '[email protected]'
```
##### curl (PowerShell)
```powershell
curl -X POST 'https://{host}/devicecontrol/bulkNewDeviceRequests' -H 'Accept: application/json' -H 'Authorization: Bearer {token}' -F '[email protected]'
```
##### file: input1.txt
```text/plain
ID AUTH_TYPE ENROLLMENT_OTP NAME TYPE IDTYPE com_cumulocity_model_Agent.active
tmp01 CERTIFICATES LookHowSecretThisIs1337 tmp01 thin-edge.io c8y_Serial true
```Minor improvements
-
feat: Remove shell aliases to avoid clashing with other cli tools by @reubenmiller in #507
-
feat: support complex non-json output from jsonnet templates by @reubenmiller in #510
-
feat: improve shell detect when installing and loading shell helpers by @reubenmiller in #515
-
feat: auto detect more ci environments like Jenkins, TeamCity, TaskCluster and dsari by @reubenmiller in #526
-
feat(beta feature): support external commands to prompt for the encryption passphrase by @reubenmiller in #518
-
feat(beta feature): inject secrets from the pin entry app when calling an external provider by @reubenmiller in #519
Fixes
-
fix(registration): add confirmation prompts to device registration commands by @reubenmiller in #508
-
fix(certificate-authority): add confirmation prompts to certificate-authority commands by @reubenmiller in #509
-
fix: update invalid doc string references to OAUTH_INTERNAL by @reubenmiller in #520
Full Changelog: v2.51.5...v2.52.0
Cumulocity CLI 2.51.5
What's Changed
- fix: encryption passphrase caching option by @reubenmiller in #504
Full Changelog: v2.51.4...v2.51.5
Cumulocity CLI 2.51.4
What's Changed
-
fix: handling of custom header values when adding to outgoing request by @reubenmiller in #501
-
ci: free up disk space for releases by @reubenmiller in #502 #503
Full Changelog: v2.51.2...v2.51.4
Cumulocity CLI 2.51.2
What's Changed
- fix(ui plugins): fix incorrect reference to path template variable by @reubenmiller in #499
Full Changelog: v2.51.1...v2.51.2
Cumulocity CLI 2.51.1
What's Changed
- fix(jsonnet): check if value is an object before accessing nested properties by @reubenmiller in #497
Full Changelog: v2.51.0...v2.51.1
Cumulocity CLI 2.51.0
What's Changed
New features
Encrypt sensitive session information by default #495
Sensitive session information such as passwords and tokens, are stored encrypted (using salt/hash). Session encryption has been around for a while in go-c8y-cli, but is now turned on by default to encourage better security practices for users. Users will be prompted to set the password file and a salt will be generated and stored on disk which is used to encrypt/decrypt the passwords/tokens. If you lose either the salt file or the password, then the information will be lost.
If you don't wish to have session encryption, then you can also disable it per session, or disable it globally in your shell profile using:
export C8Y_SETTINGS_ENCRYPTION_ENABLED='false'
Cumulocity URL shown on confirmation prompt #486
The confirmation prompt now shows the Cumulocity URL related to the go-c8y-cli session that you're using so it is easier to tell which context you are in. Now both the URL and the tenant id are shown to
Example
$ c8y devices create --name rmi_hello1 --confirm
? Confirm (job: 1)
Create device on host example.c8y.io (tenant t12345)
[y] Yes [a] Yes to All [n] No [l] No to All (y)
Minor improvements
-
feat: create session files that are only readable by the current user by @reubenmiller in #494
-
feat: add URL encode/decode template functions by @reubenmiller in #488
-
docs: add examples for downloading inventory binaries using template variables by @reubenmiller in #489
Full Changelog: v2.50.1...v2.51.0
Cumulocity CLI 2.50.1
What's Changed
- fix(software versions uninstall): add softwareType flag by @reubenmiller in #482
- docs: update man pages by @reubenmiller in #483
Full Changelog: v2.50.0...v2.50.1