Change Package Keys using Content-Cli
The package key is the unique identifier for a package in Studio. This key is set when a package is created and cannot be changed afterwards from inside Studio. The key is visible in Studio in the Package Settings or via the context menu. When you use the content-cli to pull a package, the key is used to identify the package.
When do I need to change the package key?
In general, you do not have to change the key of the package. Cases, when you might want to, include:
to distribute the package via the Marketplace (meaning this key will be visible in all installations inside customer teams) and you want to change the name assigned to the package;
the package key contains confidential information that you would like to remove.
How can I change the Package Key?
You can use the --newKey option with the pull package command to define a new key for the package, like in the following example:
Pull package with new package key
content-cli pull package --profile my-profile-name --key ap-operational-app --newKey operational-app-package
You can also use the --newKey option with the push package command, like in the following example:
Push single package with new package key
content-cli push package --profile my-other-profile --file package_ap-operational-app.zip --newKey operational-app-package