Command Line Client

Options

  -X, --attribute stringArray   attribute setting
      --config string           configuration file
  -C, --cred stringArray        credential setting
  -h, --help                    help for ocm
      --logconfig string        log config
  -L, --logfile string          set log file
  -l, --loglevel string         set log level
  -v, --verbose                 enable verbose logging
      --version                 show version

Introduction

The Open Component Model command line client support the work with OCM artifacts, like Component Archives, Common Transport Archive,
Component Repositories, and component versions.

Additionally it provides some limited support for the docker daemon, OCI artifacts and registries.

It can be used in two ways:

  • verb/operation first: here the sub commands follow the pattern <verb> <object kind> <arguments>
  • area/kind first: here the area and/or object kind is given first followed by the operation according to the pattern [<area>] <object kind> <verb/operation> <arguments>

The command accepts some top level options, they can only be given before the sub commands.

With the option –cred it is possible to specify arbitrary credentials for various environments on the command line. Nevertheless it is always preferrable to use the cli config file. Every credential setting is related to a dedicated consumer and provides a set of credential attributes. All this can be specified by a sequence of –cred options.

Every option value has the format

--cred [:]<attr>=<value>

Consumer identity attributes are prefixed with the colon (:). A credential settings always start with a sequence of at least one identity attributes, followed by a sequence of credential attributes. If a credential attribute is followed by an identity attribute a new credential setting is started.

The first credential setting may omit identity attributes. In this case it is used as default credential, always used if no dedicated match is found.

For example:

--cred :type=ociRegistry --cred hostname=ghcr.io --cred usename=mandelsoft --cred password=xyz

With the option -X it is possible to pass global settings of the form

-X <attribute>=<value>

The value can be a simple type or a json string for complex values. The following attributes are supported:

  • github.com/mandelsoft/oci/cache [cache]: string

    Filesystem folder to use for caching OCI blobs

  • github.com/mandelsoft/ocm/compat [compat]: bool

    Compatibility mode: Avoid generic local access methods and prefer type specific ones.

  • github.com/mandelsoft/ocm/keeplocalblob [keeplocalblob]: bool

    Keep local blobs when importing OCI artifacts to OCI registries from localBlob access methods. By default they will be expanded to OCI artifacts with the access method ociRegistry. If this option is set to true, they will be stored as local blobs, also. The access method will still be localBlob but with a nested ociRegistry access method for describing the global access.

  • github.com/mandelsoft/ocm/ociuploadrepo [ociuploadrepo]: oci base repository ref

    Upload local OCI artifact blobs to a dedicated repository.

  • github.com/mandelsoft/ocm/plugindir [plugindir]: plugin directory

    Directory to look for OCM plugin executables.

  • github.com/mandelsoft/ocm/signing: JSON

    Public and private Key settings given as JSON document with the following format:

    {
      "publicKeys"": [
         "<provider>": {
           "data": ""<base64>"
         }
      ],
      "privateKeys"": [
         "<provider>": {
           "path": ""<file path>"
         }
      ]
    

    One of following data fields are possible:

    • data: base64 encoded binary data
    • stringdata: plain text data
    • path: a file path to read the data from
  • github.com/mandelsoft/tempblobcache [blobcache]: string Foldername for temporary blob cache

    The temporary blob cache is used to accessing large blobs from remote sytems. The are temporarily stored in the filesystem, instead of the memory, to avoid blowing up the memory consumption.

See Also

  • ocm add — Add resources or sources to a component archive
  • ocm clean — Cleanup/re-organize elements
  • ocm create — Create transport or component archive
  • ocm describe — Describe artifacts
  • ocm download — Download oci artifacts, resources or complete components
  • ocm get — Get information about artifacts and components
  • ocm show — Show tags or versions
  • ocm sign — Sign components
  • ocm transfer — Transfer artifacts or components
  • ocm verify — Verify component version signatures