Package Identification

To identify a package, you need to obtain the Unique ID for the package (also called slug_perm for backward compatibility reasons).

You can get this either via the CLI or the Cloudsmith web app.

Obtaining Unique ID from the Cloudsmith CLI

You can get the Unique ID from the JSON output of the cloudsmith list packages command:

shell
cloudsmith list packages OWNER/REPOSITORY -F pretty_json

The JSON output from this command includes the field slug_perm (Unique ID)

list packages JSON output

You can use the -q flag to filter for a format or filename and pipe the output to a tool such as jq to further filter the fields from the JSON output.

Example:

shell
 cloudsmith list packages demo/examples-repo -F pretty_json -q "format:cargo" | jq -r ".data[].filename, .data[].slug_perm"
Using jq to filter JSON output

The Unique ID for a package is also displayed as part of the output when pushing a package to a repository using the cloudsmith push command:

Unique ID as part of cloudsmith push command output

Obtaining Unique ID from the Cloudsmith web app

The Unique ID is also available in the Package information section of the package detail page.