Skip to main content

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 content-cli to pull a package, the key is used to identify the package.

There are some cases when you might want to change the key, including:

  • 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.

Changing the package key

You can use the --newKey option with the pull package command to define a new key for the package, as 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, as seen 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

Related topics