A command-line interface (CLI) tool for interacting with commercetools products. For more information, visit the commercetools Documentation.
To install the commercetools CLI, you need Node.js (version 18.20 or higher) and npm (version 6 or higher) installed on your system.
npm install -g @commercetools/cli
commercetools --version
After installing, you can use the CLI tool with the following command:
commercetools [command] [options]
commercetools auth login
commercetools connect application add
commercetools connect application build
commercetools connect application start
commercetools connect application test
commercetools connect bundle
commercetools connect connectorstaged certify
commercetools connect connectorstaged create
commercetools connect connectorstaged describe
commercetools connect connectorstaged list
commercetools connect connectorstaged preview
commercetools connect connectorstaged publish
commercetools connect connectorstaged update
commercetools connect deployment create
commercetools connect deployment delete
commercetools connect deployment describe
commercetools connect deployment list
commercetools connect deployment logs
commercetools connect deployment redeploy
commercetools connect init DIRECTORY
commercetools connect validate [DIRECTORY]
Login to commercetools
USAGE
$ commercetools auth login --client-credentials --client-id <value> --client-secret <value> --region <value>
--project-key <value> [--scope <value>]
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 project key for your commercetools project
--region=<value> (required) The commercetools API region to authenticate against (e.g., "europe-west1.gcp")
--scope=<value> Specify the scopes to granted for the access token
DESCRIPTION
Login to commercetools
Add an application to your existing Connect project
USAGE
$ commercetools connect application add [--language <value>] [--type <value>]
FLAGS
--language=<value> The language template to use in your new application.
--type=<value> The application type of your new application.
DESCRIPTION
Add an application to your existing Connect project
Build your Connect application
USAGE
$ commercetools connect application build
DESCRIPTION
Build your Connect application
Start your Connect application
USAGE
$ commercetools connect application start
DESCRIPTION
Start your Connect application
Run your Connect application tests
USAGE
$ commercetools connect application test
DESCRIPTION
Run your Connect application tests
Bundle your Connect applications
USAGE
$ commercetools connect bundle
DESCRIPTION
Bundle your Connect applications
Initiates the certification process for a staged Connector.
USAGE
$ commercetools connect connectorstaged certify [--id <value>] [--key <value>]
FLAGS
--id=<value> Unique identifier of the staged Connector. Must specify either `id` or `key`.
--key=<value> User-defined unique identifier of the staged Connector. Must specify either `id` or `key`.
DESCRIPTION
Initiates the certification process for a staged Connector.
Create a new Connector-staged.
USAGE
$ 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...]
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>
DESCRIPTION
Create a new Connector-staged.
Describe a staged Connector by ID or key.
USAGE
$ commercetools connect connectorstaged describe [--id <value>] [--key <value>]
FLAGS
--id=<value> Unique identifier of the staged Connector. Must specify either `id` or `key`.
--key=<value> User-defined unique identifier of the staged Connector. Must specify either `id` or `key`.
DESCRIPTION
Describe a staged Connector by ID or key.
List staged Connector.
USAGE
$ commercetools connect connectorstaged list [--limit <value>] [--offset <value>] [--sort <value>]
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'.
DESCRIPTION
List staged Connector.
Initiates the required validations and creates a preview Deployment of a staged Connector.
USAGE
$ commercetools connect connectorstaged preview --deployment-key <value> --region
us-central1.gcp|europe-west1.gcp|australia-southeast1.gcp [--id <value>] [--key <value>] [--configuration
<value>...]
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. Must specify either `id` or `key`.
--key=<value> User-defined unique identifier of the staged Connector. Must specify either `id` or `key`.
--region=<option> (required) Region where the preview Deployment will take place.
<options: us-central1.gcp|europe-west1.gcp|australia-southeast1.gcp>
DESCRIPTION
Initiates the required validations and creates a preview Deployment of a staged Connector.
Initiates the publishing process for a staged Connector.
USAGE
$ commercetools connect connectorstaged publish [--id <value>] [--key <value>]
FLAGS
--id=<value> Unique identifier of the staged Connector. Must specify either `id` or `key`.
--key=<value> User-defined unique identifier of the staged Connector. Must specify either `id` or `key`.
DESCRIPTION
Initiates the publishing process for a staged Connector.
Update an existing Connector-staged, such as its name, description, repository, or supported regions.
USAGE
$ 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...]
FLAGS
--creator-email=<value> Email address of the Connector creator.
--description=<value> Description of the Connector.
--id=<value> Unique identifier of the staged Connector. 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> User-defined unique identifier of the staged Connector. 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>
DESCRIPTION
Update an existing Connector-staged, such as its name, description, repository, or supported regions.
Create a new Deployment.
USAGE
$ 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>...]
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>
DESCRIPTION
Create a new Deployment.
Delete a Deployment by ID or key.
USAGE
$ commercetools connect deployment delete [--id <value>] [--key <value>]
FLAGS
--id=<value> Unique identifier of the Deployment. Must specify either `id` or `key`.
--key=<value> User-defined unique identifier of the Deployment. Must specify either `id` or `key`.
DESCRIPTION
Delete a Deployment by ID or key.
Describe a Deployment by ID or key.
USAGE
$ commercetools connect deployment describe [--id <value>] [--key <value>]
FLAGS
--id=<value> Unique identifier of the Deployment. Must specify either `id` or `key`.
--key=<value> User-defined unique identifier of the Deployment. Must specify either `id` or `key`.
DESCRIPTION
Describe a Deployment by ID or key.
List all the Deployments.
USAGE
$ commercetools connect deployment list [--limit <value>] [--offset <value>] [--sort <value>]
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'.
DESCRIPTION
List all the Deployments.
Get the logs of a Deployment by ID or key.
USAGE
$ commercetools connect deployment logs [--id <value>] [--key <value>] [--application <value>] [--startDate <value>]
[--endDate <value>]
FLAGS
--application=<value> Filter logs by application name.
--endDate=<value> A date-time string in the format YYYY-MM-DD HH:mm:ss or YYYY-MM-DDTHH:mm:ss
--id=<value> Unique identifier of the Deployment. Must specify either `id` or `key`.
--key=<value> User-defined unique identifier of the Deployment. Must specify either `id` or `key`.
--startDate=<value> A date-time string in the format YYYY-MM-DD HH:mm:ss or YYYY-MM-DDTHH:mm:ss
DESCRIPTION
Get the logs of a Deployment by ID or key.
Redeploy a Deployment by ID or key.
USAGE
$ commercetools connect deployment redeploy [--key <value>] [--id <value>] [--configuration <value>...] [--skipScripts]
[--updateConnector]
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. Must specify either `id` or `key`.
--key=<value> Key of the Deployment to redeploy.
--skipScripts Skip the execution of scripts.
--updateConnector Update the Connector to the latest version.
DESCRIPTION
Redeploy a Deployment by ID or key.
Initialize a new Connect project
USAGE
$ commercetools connect init DIRECTORY [--template
tax-integration|product-ingestion|email-integration|payment-integration|fulfilment-integration]
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>
DESCRIPTION
Initialize a new Connect project
Validate your Connect applications
USAGE
$ commercetools connect validate [DIRECTORY] [--skip tests|analysis]
ARGUMENTS
DIRECTORY [default: .] connect project directory
FLAGS
--skip=<option> Skip the specified validation step. Options are 'test' or 'analysis'.
<options: tests|analysis>
DESCRIPTION
Validate your Connect applications
This project is licensed under the MIT License.