Configure and deploy extensions

Ask about this Page
Copy for AI
View as Markdown

Use the Commerce Integration Layer CLI to configure, deploy, and manage extensions in production.

Before following the steps in this page, scaffold an extension.

Environment configuration and secrets

Set configuration

Sets a value available to resolvers and handlers through ctx.config. Add --secret to encrypt and mask the value.
commercetools integration-layer config set MY_API_KEY secure-token-123 --secret

List configuration

Lists configuration values for the active Project. Secret values are masked.

commercetools integration-layer config list

Outbound HTTP domain allowlist

Patterns are bare hostnames (api.example.com) or suffix wildcards (*.example.com); quote wildcards so the shell does not expand them. The list also shows any operator deny patterns that take precedence; those are read-only from the CLI.

List allowed domains

Lists external domains that sandboxed extensions can call with fetch. Allowed calls are still subject to outbound request limits.
commercetools integration-layer allowlist list

Add allowed domains

Adds bare hostnames or suffix wildcard patterns to the allowlist.

commercetools integration-layer allowlist add api.vendor.com '*.algolia.net'

Remove an allowed domain

Removes a hostname or pattern from the allowlist.

commercetools integration-layer allowlist remove api.vendor.com

Replace the allowlist

Replaces the complete allowlist with one or more hostnames or patterns. Requires at least one host; use remove instead to drop individual hosts.
commercetools integration-layer allowlist set api.vendor.com api.example.com
You can also manage the allowlist from the Merchant Center Commerce Integration Layer application. The CLI commands above require @commercetools/cli-topic-integration-layer 0.7.0 or later.

Publishing, rollouts, and status checks

Publish an extension

Builds, validates, and deploys the extension bundle. Use --no-wait to exit before the health check or --wait-timeout to set its duration.
commercetools integration-layer extension push --wait-timeout 180

Check deployment status

Displays the newest stored bundle's version, size, upload time, and source revision, when recorded. It doesn't report lifecycle state, a failure reason, or which revision is actually served — see Checking what's live for where to find those.
commercetools integration-layer extension status

Further reading

  • Walk through enrolling a Project, installing the CLI, and publishing your first extension in Get started
  • What happens after a push, including the pending, running, and failed rollout states, in Operations and performance