Connect CLI

Manage your Connect applications with a CLI.

The Connect CLI allows you to access, create, and manage Connectors and Connect applications.

Requirements

To use the Connect CLI, you must utilize the following:

Install the Connect CLI

To install the Connect CLI globally, use the following command:

npm install -g @commercetools/cli

You can verify the installation and find further information using the following command:

commercetools --help

To check the CLI version, use the following command:

commercetools --version

Connector development commands

The following CLI commands are available for developing a Connector.

commercetools connect init

Use this command to create a new Connect project.

commercetools connect init DIRECTORY [--template tax-integration|product-ingestion|email-integration|payment-integration|fulfilment-integration]

This command uses the following arguments and flags:

ARGUMENTS
  DIRECTORY  project directory

FLAGS
  --template=<option>  The template to bootstrap the project with.
                       <options:
                       tax-integration|product-ingestion|email-integration|payment-integration|fulfilment-integration>

commercetools connect application start

Use this command to start your Connect application.

commercetools connect application start

commercetools connect application build

Use this command to build your Connect application.

commercetools connect application build

commercetools connect application test

Use this command to test your Connect application.

commercetools connect application test

commercetools connect application add

Use this command to add a Connect application to an existing Connect project.

commercetools connect application add [--language <value>] [--type <value>]

This command uses the following flags:

FLAGS
  --language=<value>  The language template to use in your new application.
  --type=<value>      The application type of your new application.

commercetools connect bundle

Use this command to bundle your Connect applications.

commercetools connect bundle

commercetools connect validate

Use this command to validate your Connect applications.

commercetools connect validate [DIRECTORY] [--skip tests|analysis]

This command uses the following arguments and flags:

ARGUMENTS
  DIRECTORY  [default: .] connect project directory

FLAGS
  --skip=<option>  Skip the specified validation step. Options are 'test' or 'analysis'.
                   <options: tests|analysis>

CLI authorization commands

The following CLI commands are available for the authorizing the CLI.

commercetools auth login

Use this command to give the CLI access to your Composable Commerce Project.

commercetools auth login --client-credentials --client-id <value> --client-secret <value> --region <value> --project-key <value> [--scope <value>]

This command uses the following flags:

FLAGS
  --client-credentials     (required) Use client credentials authentication flow
  --client-id=<value>      (required) The client ID associated with your commercetools API Client
  --client-secret=<value>  (required) The client secret associated with your commercetools API Client
  --project-key=<value>    (required) The key of your commercetools Project
  --region=<value>         (required) The region that hosts your commercetools Project (e.g., "europe-west1.gcp")
  --scope=<value>          Specify the scopes granted to the access token

Connector management commands

The following CLI commands are available for managing Connectors.

commercetools connect connectorstaged create

Use this command to create a new ConnectorStaged.
commercetools connect connectorstaged create --repository-url <value> --repository-tag <value> --creator-email <value> --name
    <value> [--key <value>] [--description <value>] [--supported-regions
    us-central1.gcp|europe-west1.gcp|australia-southeast1.gcp...] [--integration-types
    tax|marketplace|oms|psp|pim|promotion|search|erp|crm|email|analytics|shipping|other...]

This command uses the following flags:

FLAGS
  --creator-email=<value>          (required) Email address of the Connector creator.
  --description=<value>            Description of the Connector.
  --integration-types=<option>...  Comma-separated list of integration types to classify the Connector.
                                   <options:
                                   tax|marketplace|oms|psp|pim|promotion|search|erp|crm|email|analytics|shipping|other>
  --key=<value>                    User-defined unique identifier for the staged Connector.
  --name=<value>                   (required) Name of the Connector.
  --repository-tag=<value>         (required) Git tag identifying the code version to use.
  --repository-url=<value>         (required) Git repository URL hosting the Connector.
  --supported-regions=<option>...  Comma-separated list of regions supported by the Connector.
                                   <options: us-central1.gcp|europe-west1.gcp|australia-southeast1.gcp>

commercetools connect connectorstaged describe

Use this command to describe a ConnectorStaged.
commercetools connect connectorstaged describe [--id <value>] [--key <value>]

This command uses the following flags:

FLAGS
  --id=<value>   Unique identifier of the staged Connector. Either `id` or `key` must be provided.
  --key=<value>  User-defined unique identifier of the staged Connector. Either `id` or `key` must be provided.

commercetools connect connectorstaged list

commercetools connect connectorstaged list [--limit <value>] [--offset <value>] [--sort <value>]

This command uses the following flags:

FLAGS
  --limit=<value>   [default: 20] The maximum number of items to return in a single page of results.
  --offset=<value>  The number of items to skip before starting to return results.
  --sort=<value>    Specifies the field by which to sort the results. Available fields are 'createdAt' and 'lastModifiedAt'.

commercetools connect connectorstaged publish

Use this command to initiate the publishing process for a staged Connector.

commercetools connect connectorstaged publish [--id <value>] [--key <value>]

This command uses the following flags:

FLAGS
  --id=<value>   Unique identifier of the staged Connector. Either `id` or `key` must be provided.
  --key=<value>  User-defined unique identifier of the staged Connector. Either `id` or `key` must be provided.

commercetools connect connectorstaged update

Use this command to update a ConnectorStaged. For example, the name, description, repository, or supported regions.

commercetools connect connectorstaged update [--id <value>] [--key <value>] [--repository-url <value>] [--repository-tag
    <value>] [--creator-email <value>] [--name <value>] [--description <value>] [--supported-regions
    us-central1.gcp|europe-west1.gcp|australia-southeast1.gcp...] [--integration-types
    tax|marketplace|oms|psp|pim|promotion|search|erp|crm|email|analytics|shipping|other...]

This command uses the following flags:

FLAGS
  --creator-email=<value>          Email address of the Connector creator.
  --description=<value>            Description of the Connector.
  --id=<value>                     Unique identifier of the staged Connector. Either `id` or `key` must be provided.
  --integration-types=<option>...  Comma-separated list of integration types to classify the Connector.
                                   <options:
                                   tax|marketplace|oms|psp|pim|promotion|search|erp|crm|email|analytics|shipping|other>
  --key=<value>                    User-defined unique identifier of the staged Connector. Either `id` or `key` must be provided.
  --name=<value>                   Name of the Connector.
  --repository-tag=<value>         Git tag identifying the code version to use.
  --repository-url=<value>         Git repository URL hosting the Connector.
  --supported-regions=<option>...  Comma-separated list of regions supported by the Connector.
                                   <options: us-central1.gcp|europe-west1.gcp|australia-southeast1.gcp>

commercetools connect connectorstaged certify

Use this command to initiate the certification process for a ConnectorStaged.

commercetools connect connectorstaged certify [--id <value>] [--key <value>]

This command uses the following flags:

FLAGS
  --id=<value>   Unique identifier of the staged Connector. Either `id` or `key` must be provided.
  --key=<value>  User-defined unique identifier of the staged Connector. Either `id` or `key` must be provided.

Deployment management commands

The following CLI commands are available for the deploying a Connector.

commercetools connect connectorstaged preview

Use this command to initiate the required validations and create a preview deployment of a ConnectorStaged.

commercetools connect connectorstaged preview --deployment-key <value> --region
    us-central1.gcp|europe-west1.gcp|australia-southeast1.gcp [--id <value>] [--key <value>] [--configuration
    <value>...]

This command uses the following flags:

FLAGS
  --configuration=<value>...  Configuration values: Pass values in the format '{applicationName}.{key}={value}' for
                              application-specific configurations, or '{key}={value}' for global configurations.
  --deployment-key=<value>    (required) User-defined unique identifier for the Deployment.
  --id=<value>                Unique identifier of the staged Connector. Either `id` or `key` must be provided.
  --key=<value>               User-defined unique identifier of the staged Connector. Either `id` or `key` must be provided.
  --region=<option>           (required) Region where the preview Deployment will take place.
                              <options: us-central1.gcp|europe-west1.gcp|australia-southeast1.gcp>

commercetools connect deployment create

Use this command to create a new Deployment.
commercetools connect deployment create --region us-central1.gcp|europe-west1.gcp|australia-southeast1.gcp [--key <value>]
    [--connector-id <value>] [--connector-key <value>] [--connector-staged] [--type preview|sandbox|production]
    [--configuration <value>...]

This command uses the following flags:

FLAGS
  --configuration=<value>...  Configuration values: Pass values in the format '{applicationName}.{key}={value}' for
                              application-specific configurations, or '{key}={value}' for global configurations.
  --connector-id=<value>      Unique identifier of the Connector. Must specify either `connector-id` or `connector-key`.
  --connector-key=<value>     User-defined unique identifier of the Connector. Must specify either `connector-id` or `connector-key`
  --connector-staged          Flag to indicate if the Deployment is for a staged Connector.
  --key=<value>               User-defined unique identifier for the Deployment
  --region=<option>           (required) Region where the Deployment is associated.
                              <options: us-central1.gcp|europe-west1.gcp|australia-southeast1.gcp>
  --type=<option>             The type of Deployment.
                              <options: preview|sandbox|production>

commercetools connect deployment delete

Use this command to delete a Deployment.
commercetools connect deployment delete [--id <value>] [--key <value>]

This command uses the following flags:

FLAGS
  --id=<value>   Unique identifier of the Deployment. Either `id` or `key` must be provided.
  --key=<value>  User-defined unique identifier of the Deployment. Either `id` or `key` must be provided.

commercetools connect deployment describe

Use this command to describe a new Deployment.
commercetools connect deployment describe [--id <value>] [--key <value>]

This command uses the following flags:

FLAGS
  --id=<value>   Unique identifier of the Deployment. Either `id` or `key` must be provided.
  --key=<value>  User-defined unique identifier of the Deployment. Either `id` or `key` must be provided.

commercetools connect deployment redeploy

Use this command to redeploy a Deployment.
commercetools connect deployment redeploy [--key <value>] [--id <value>] [--configuration <value>...] [--skipScripts]
    [--updateConnector]

This command uses the following flags:

FLAGS
  --configuration=<value>...  Configuration values: Pass values in the format '{applicationName}.{key}={value}' for
                              application-specific configurations, or '{key}={value}' for global configurations.
  --id=<value>                Unique identifier of the Deployment. Either `id` or `key` must be provided.
  --key=<value>               Key of the Deployment to redeploy.
  --skipScripts               Skip the execution of scripts.
  --updateConnector           Update the Connector to the latest version.

commercetools connect deployment list

Use this command to retrieve a list of Deployments.
commercetools connect deployment list [--limit <value>] [--offset <value>] [--sort <value>]

This command uses the following flags:

FLAGS
  --limit=<value>   [default: 20] The maximum number of items to return in a single page of results.
  --offset=<value>  The number of items to skip before starting to return results.
  --sort=<value>    Specifies the field by which to sort the results. Available fields are 'createdAt' and 'lastModifiedAt'.

commercetools connect deployment logs

commercetools connect deployment logs [--id <value>] [--key <value>] [--application <value>] [--startDate <value>]
    [--endDate <value>]

This command uses the following flags:

FLAGS
  --application=<value>  Filter logs by application name.
  --endDate=<value>      A datetime string in the format YYYY-MM-DD HH:mm:ss or YYYY-MM-DDTHH:mm:ss
  --id=<value>           Unique identifier of the Deployment. Either `id` or `key` must be provided.
  --key=<value>          User-defined unique identifier of the Deployment. Either `id` or `key` must be provided.
  --startDate=<value>    A datetime string in the format YYYY-MM-DD HH:mm:ss or YYYY-MM-DDTHH:mm:ss