@commercetools/cli-topic-integration-layer
A commercetools CLI plugin that adds the
integration-layer topic — the tooling for authoring, running, validating, publishing,
and inspecting Commerce Integration Layer extensions.
It is published to the public npm registry and installed on demand as a runtime oclif
plugin; it is never bundled into the base @commercetools/cli.
Install
npm install -g @commercetools/cli
# Opt in to the integration-layer topic (public npm — no auth needed)
commercetools plugins install @commercetools/cli-topic-integration-layer
# Log in once — mints the manage_project token the authenticated commands reuse
commercetools auth login --project-key <your-project-key>
Commands
commercetools integration-layer init [DIR] # scaffold an extensions monorepo [offline]
commercetools integration-layer extension build # bundle src/extension.ts → dist [offline]
commercetools integration-layer extension serve # local dev server; allowlist-gated fetch when online + logged in
commercetools integration-layer extension invoke-api-extension # fire an API-Extension callback at the local bundle [offline], or --deployed via the IL
commercetools integration-layer explore # local GraphQL explorer over your deployed edge
commercetools integration-layer schema fetch # the Project's core-subgraph SDL
commercetools integration-layer config list|get|set|unset # per-project extension configuration
commercetools integration-layer allowlist list|add|remove|set # hosts the extension's fetch may reach
commercetools integration-layer project-settings get|set # project label, language, currency, country
commercetools integration-layer idp-login get|set|delete # external OpenID Connect IdP for shopper login
commercetools integration-layer checkout-rules get|add|remove|set # which Checkout Application serves which shopper
commercetools integration-layer field-visibility list|hide|show|set # custom fields hidden from the public API
commercetools integration-layer --version # the installed plugin version [offline]
Add --all to build / serve / validate / push to merge every extension under
./extensions/* into the single bundle a Project deploys.
Authenticated commands present the token from commercetools auth login (a
manage_project bearer) and derive the Commerce Integration Layer's hosts from your login
Region; --integration-layer-url / INTEGRATION_LAYER_URL overrides the extensions
edge.
Full reference — every command, flag, host, and CI usage and extension-authoring detail live in the commerce-integration-layer-extensions repository, which also holds ready-to-edit templates for each pattern.
Develop
This package lives in the commerce-integration-layer-extensions repo. From the repo root:
pnpm install
pnpm --filter @commercetools/cli-topic-integration-layer build # tsc → dist/
pnpm --filter @commercetools/cli-topic-integration-layer test # vitest
pnpm typecheck
pnpm lint
pnpm setup:cli # build + `commercetools plugins link` this checkout
Changing the plugin? Add a changeset (pnpm changeset) in your PR — see
Developing the plugin for the release flow.