@commercetools/cli

0.0.8 • Public • Published

commercetools CLI

License: MIT

A command-line interface (CLI) tool for interacting with commercetools products. For more information, visit the commercetools Documentation.

Table of Contents

Installation

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

Version

commercetools --version

Usage

After installing, you can use the CLI tool with the following command:

commercetools [command] [options]

Commands

commercetools auth login

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

commercetools connect application add

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

commercetools connect application build

Build your Connect application

USAGE
  $ commercetools connect application build

DESCRIPTION
  Build your Connect application

commercetools connect application start

Start your Connect application

USAGE
  $ commercetools connect application start

DESCRIPTION
  Start your Connect application

commercetools connect application test

Run your Connect application tests

USAGE
  $ commercetools connect application test

DESCRIPTION
  Run your Connect application tests

commercetools connect bundle

Bundle your Connect applications

USAGE
  $ commercetools connect bundle

DESCRIPTION
  Bundle your Connect applications

commercetools connect connectorstaged certify

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.

commercetools connect connectorstaged create

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.

commercetools connect connectorstaged describe

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.

commercetools connect connectorstaged list

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.

commercetools connect connectorstaged preview

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.

commercetools connect connectorstaged publish

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.

commercetools connect connectorstaged update

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.

commercetools connect deployment create

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.

commercetools connect deployment delete

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.

commercetools connect deployment describe

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.

commercetools connect deployment list

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.

commercetools connect deployment logs

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.

commercetools connect deployment redeploy

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.

commercetools connect init DIRECTORY

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

commercetools connect validate [DIRECTORY]

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

License

This project is licensed under the MIT License.

Readme

Keywords

none

Package Sidebar

Install

npm i @commercetools/cli

Weekly Downloads

175

Version

0.0.8

License

MIT

Unpacked Size

23.9 kB

Total Files

19

Last publish

Collaborators

  • commercetools-admin
  • emmenko
  • hajoeichler
  • yanns
  • tdeekens
  • timonrey
  • vineetkumarkushwaha
  • markusazer
  • jherey
  • danrleyt
  • jenschude
  • chukwuemeka