ocm download cli [<options>]  [<component> {<name> { <key>=<value> }}]


  -c, --constraints constraints   version constraint
  -h, --help                      help for cli
  -O, --outfile string            output file or directory
  -p, --path                      lookup executable in PATH
      --repo string               repository name or spec


Download an OCM CLI executable. By default, the standard publishing component and repository is used. Optionally, another component or repo and even a resource can be specified. Resources are specified by identities. An identity consists of a name argument followed by optional <key>=<value> arguments.

The option -O is used to declare the output destination. The default location is the location of the ocm executable in the actual PATH.

If the option –constraints is given, and no version is specified for a component, only versions matching the given version constraints (semver are selected.

If the –repo option is specified, the given names are interpreted relative to the specified repository using the syntax


If no –repo option is specified the given names are interpreted as located OCM component version references:

[<repo type>::]<host>[:<port>][/<base path>]//<component>[:<version>]

Additionally there is a variant to denote common transport archives and general repository specifications

[<repo type>::]<filepath>|<spec json>[//<component>[:<version>]]

The –repo option takes an OCM repository specification:

[<repo type>::]<configured name>|<file path>|<spec json>

For the Common Transport Format the types directory, tar or tgz is possible.

Using the JSON variant any repository types supported by the linked library can be used:

Dedicated OCM repository types:

  • ComponentArchive: v1

OCI Repository types (using standard component repository to OCI mapping):

  • CommonTransportFormat: v1
  • OCIRegistry: v1
  • oci: v1
  • ociRegistry

The library supports some downloads with semantics based on resource types. For example a helm chart can be download directly as helm chart archive, even if stored as OCI artifact. This is handled by download handler. Their usage can be enabled with the –download-handlers option. Otherwise the resource as returned by the access method is stored.

See Also

  • ocm download — Download oci artifacts, resources or complete components