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 [--templatetax-integration|product-ingestion|email-integration|payment-integration|fulfilment-integration]
This command uses the following arguments and flags:
ARGUMENTSDIRECTORY project directoryFLAGS--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:
ARGUMENTSDIRECTORY [default: .] connector project directoryFLAGS--skip=<option> Skip the specified validation step. Options are 'test' or 'analysis'.<options: tests|analysis>
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) The client credentials for the authentication flow.--client-id=<value> (required) The client ID of your commercetools API client.--client-secret=<value> (required) The client secret of your commercetools API client.--project-key=<value> (required) The project key of your commercetools Project.--region=<value> (required) The commercetools API region to authenticate against (e.g., "europe-west1.gcp").--scope=<value> The scopes to be granted for the access token.
Connector management commands
The following CLI commands are available for managing a Connector.
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-regionsus-central1.gcp|europe-west1.gcp|australia-southeast1.gcp|eastus.azure...] [--integration-typestax|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> Unique key to identify the Connector.--name=<value> (required) Name of the Connector.--repository-tag=<value> (required) Git tag to identify 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|eastus.azure>
commercetools connect connectorstaged list
Use this command to retrieve a list of staged Connectors.
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> The unique identifier for the staged Connector to be published. You must specify either `id` or `key`.--key=<value> The key for the staged Connector to be published. You must specify either `id` or `key`.
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-regionsus-central1.gcp|europe-west1.gcp|australia-southeast1.gcp|eastus.azure...] [--integration-typestax|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> Identifier for the Connector to update. Must specify either `id` or `key`.--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> Key for the Connector to update. Must specify either `id` or `key`.--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|eastus.azure>
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> The unique identifier for the staged Connector to be certified. You must specify either `id` or `key`.--key=<value> The key for the staged Connector to be certified. You must specify either `id` or `key`.
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> --regionus-central1.gcp|europe-west1.gcp|australia-southeast1.gcp|eastus.azure --configuration <value>... [--id <value>][--key <value>]
This command uses the following flags:
FLAGS--configuration=<value>... (required) Specifies configuration key-value pairs following the pattern 'applicationName.key=value' to be used in the preview deployment.--deployment-key=<value> (required) Deployment key to associate with the preview deployment.--id=<value> Identifier for the staged Connector to preview. Must specify either `id` or `key`.--key=<value> Key for the staged Connector to preview. Must specify either `id` or `key`.--region=<option> (required) Specifies the region where the preview deployment will take place.<options: us-central1.gcp|europe-west1.gcp|australia-southeast1.gcp|eastus.azure>