docs
  1. Changelogs
  2. Storefront Tooling
  3. @scayle/storefront-cli

@scayle/storefront-cli

1.2.0

Minor Changes

  • Added a --non-interactive flag (also SCAYLE_CLI_NON_INTERACTIVE) to every command. In that mode, a missing required flag — including --parent-shop-key on sfcli setup, since there is no default shop to select — aborts with an error naming the flag instead of prompting for it. Prompts that only confirm a safe default take that default instead: an existing .env, config/shops.ts (V2), or storefront.config.ts (V3) is not overwritten (a parallel copy is written, same as the interactive default), and STOREFRONT_SESSION_SECRET is generated without asking. sfcli setup no longer prompts for the Storefront API key or OAuth credentials either — it leaves them blank in .env and logs a warning listing the variables. This restores non-interactive CI runs of sfcli setup, which 1.1.0 broke by adding prompts with no bypass.

Patch Changes

  • Updated dependency @oclif/core@^4 to @oclif/core@^5.0.0
  • Updated dependency @oclif/plugin-commands@^4 to @oclif/plugin-commands@^5.0.0
  • Updated dependency @oclif/plugin-help@^6 to @oclif/plugin-help@^7.0.0
  • Updated dependency @oclif/plugin-not-found@^3 to @oclif/plugin-not-found@^4.0.0

1.1.0

Minor Changes

  • [CLI] The setup cms storyblok, setup cms contentful, and setup cms contentstack commands now work in a Storefront Application V3 project. Previously they assumed Nuxt and aborted with "nuxt.config.ts does not exist" in any V3 directory.
    Each command detects the Storefront Application stack and writes the configuration that stack actually reads. For V2 nothing changes: nuxt.config.ts still gets the cms.provider and runtimeConfig.public.cms block, and the same NUXT_PUBLIC_CMS_* variables are written. For V3 no config file is touched, because V3 selects its CMS provider from CMS_PROVIDER at build time through a Vite alias and at runtime through the server provider factory. Instead the command writes CMS_PROVIDER plus the provider-prefixed variables the V3 CMS services read: STORYBLOK_CMS_*, CONTENTFUL_CMS_*, or CONTENTSTACK_CMS_*.
    Importing the bundled content model is unchanged and shared by both stacks, including the --import-content-model flag and the ./.scayle/cms/contentModel/<provider>/ source paths.
  • The CMS setup commands now ask for import credentials exactly when they are needed. setup cms storyblok prompts for the Personal Access Token when --import-content-model is enabled, instead of failing after .env was already written. setup cms contentful and setup cms contentstack no longer prompt for a management token when the import is disabled. A run that is missing a conditionally required credential exits before any file is changed, and the error names the missing flag; a credential answered with a blank value counts as missing, and blank values never overwrite an existing .env entry. setup cms storyblok also resolves the region of the space: it is derived from the Space ID, which encodes it, and the new --region flag overrides that for the one case the encoding cannot express (Space IDs below 1,000,000 share a range between Europe and China). The resolved region selects the Management API host for the content model import, and in a Storefront Application V3 project it is also written to STORYBLOK_CMS_REGION. A required flag supplied with a blank value (for example an unset shell variable) now also aborts the run instead of being dropped silently, and values are written to .env trimmed.
  • [CLI] Added Storefront Application V3 support to the setup command. The CLI now detects V2 (Nuxt) and V3 projects and runs the matching setup flow under src/setup/.
    [CLI] Refactored env scaffolding to load .env.example via EnvFile.fromContent(), replace tenant-space placeholders, remove shop-specific template variables, and insert per-country checkout credentials.
  • [CLI] Added a setup cms amplience command, so Amplience can be configured like the other three CMS providers. Both stacks have supported Amplience at runtime for a while, but the CLI had no command for it, which left it as the only provider whose setup was a manual .env edit followed by the boilerplate's own pnpm cms:import.
    In a Storefront Application V3 project the command writes CMS_PROVIDER=amplience, AMPLIENCE_CMS_HUB_NAME, AMPLIENCE_CMS_HUB_ID and AMPLIENCE_CMS_PERSONAL_ACCESS_TOKEN. In a Storefront Application V2 project it writes the NUXT_PUBLIC_CMS_HUB_NAME form and updates nuxt.config.ts with cms.provider and the runtimeConfig.public.cms block.
    Only the hub name is needed to run the storefront. The hub ID and personal access token are asked for when --import-content-model=true, and skipped otherwise, since they exist purely for the content model import.
    Amplience is the one provider without an importable Node SDK, so --import-content-model shells out to the project's own @amplience/dc-cli: configure, then content-type-schema import, then content-type import. Credentials and the content model directories are checked before any hub call, and the command prints the same overwrite warning as scripts/import-cms.sh, since the import replaces content type settings, repositories and parent schemas rather than merging them.

Patch Changes

  • [CLI] setup cms contentstack, setup cms storyblok, and setup cms contentful now continue past a content type, component, or label that fails to import instead of aborting on the first failure, and report every failure in a summary once the run finishes. setup cms amplience still stops at the first failed dc-cli step, since its three steps depend on each other, but now reports through the same summary format as the other three providers.
  • Storefront Application V2 (Nuxt) detection in sfcli deploy now requires nuxt.config.ts; projects that only declare a nuxt dependency in package.json are no longer detected and need an explicit --git-ref. With that exception, V2 behavior is unchanged, and sfcli deploy now also infers the git reference for Storefront Application V3 projects. Passing --git-ref still overrides the inference, and running the command in a directory that is not a git repository reports the missing reference instead of failing with a raw git error.
  • Added dependency @storyblok/region-helper@^1.5.0
  • Updated dependency @inquirer/[email protected] to @inquirer/prompts@^8.5.2
  • Updated dependency @nuxt/[email protected] to @nuxt/[email protected]
  • Updated dependency [email protected] to contentful-import@^10.0.18
  • Updated dependency [email protected] to [email protected]
  • Updated dependency [email protected] to [email protected]
  • Updated dependency storyblok-js-client@^7.6.0 to storyblok-js-client@^7.7.1
  • CLI Improved setup command output with clearer guidance, section headings, styled links, and masked prompts for secrets (API keys, OAuth credentials, Admin API token, deploy token, CMS tokens). Added optional title on promptable flags for short guidance headings separate from the inquirer message.

1.0.0

Major Changes

  • [CLI] [BREAKING] Removed the experimental features list and features add commands due to low adoption.

Patch Changes

0.20.1

Patch Changes

  • Make --log-level=debug and --log-level=trace enable the CLI's debug output (via the DEBUG env var). Failed SCAYLE Admin API requests now include the response body in the thrown error instead of only the HTTP status text, so failures surface the actual reason.

0.20.0

Minor Changes

  • Send the Tenant-Space header on all Admin API requests when the Admin API host is overridden. By default the tenant space is conveyed through the host subdomain (https://{tenant-space}.admin.api.scayle.cloud), but when the host is overridden via the hidden --admin-api-host flag (env SCAYLE_CLI_ADMIN_HOST) it is no longer encoded in the URL. The AdminApiClient now accepts an optional tenantSpace and includes it as the Tenant-Space header so the Admin API can resolve the request context. Without an override, behavior is unchanged.

0.19.1

Patch Changes

0.19.0

Minor Changes

  • Add a --admin-host flag (env SCAYLE_CLI_ADMIN_HOST) to the setup command for overriding the SCAYLE Admin API host. When the flag is unset, the host is still derived from the tenant space.

0.18.0

Minor Changes

  • All packages now require Node.js 22 or later, in line with the current Node.js LTS release schedule. See the Node.js release schedule for details.
    If your project is still running an older Node.js version, now is a good time to upgrade to Node.js 22 at minimum, or ideally Node.js 24, for the latest security patches and stability improvements.

Patch Changes

0.17.5

Patch Changes

0.17.4

Patch Changes

0.17.3

Patch Changes

0.17.2

Patch Changes

0.17.1

Patch Changes

0.17.0

Minor Changes

  • [CLI] Added Contentstack as a supported CMS provider for the setup cms command and refactored CMS provider setup commands into separate subcommands.
    The CMS setup commands have been refactored to use provider-specific subcommands instead of a single command with a --provider flag. Each CMS provider now has its own dedicated command: setup cms contentful, setup cms storyblok, and setup cms contentstack. This improves code organization, makes the CLI more intuitive, and simplifies adding new CMS providers in the future.
    The setup cms contentstack command streamlines the configuration of Contentstack as a CMS provider for SCAYLE Storefront Application projects. It automates the setup process, ensuring quick and efficient integration with minimal manual configuration.

    Required Flags


    The following flags are required for Contentstack:
    • --api-key (-k): The Contentstack Stack API Key required to identify the target stack
    • --delivery-token (-d): Content Delivery Token used for fetching published content via Content Delivery API
    • --preview-token (-p): Content Preview Token used for fetching draft/preview content via Content Preview API
    • --region (-r): Region for the stack (options: na, eu, au, azure-na, azure-eu, gcp-na, gcp-eu)
    • --environment (-e): Environment name in Contentstack determines which environment to use for content retrieval
    • --branch (-b): Branch used with Contentstack's branch feature (defaults to main)
    • --management-token (-m): Contentstack Management Token required for importing the content model via the Management API

    The API key, delivery token, preview token, and management token for Contentstack can be found in your stack's settings page. For further information, refer to the official Contentstack documentation.

    Optional Flag

    • --import-content-model (-i): Import the content model into the CMS

    Key features include:
    • Support for Contentstack CMS provider alongside existing Contentful and Storyblok providers
    • Automatic generation of environment variables with Contentstack-specific tokens and configuration
    • Automatic updates to nuxt.config.ts with the Contentstack provider configuration
    • Optional content model import feature allows you to populate CMS spaces with predefined content structures. Use this option only with empty CMS spaces, as it may overwrite any existing content models.

Patch Changes

0.16.4

Patch Changes

0.16.3

Patch Changes

0.16.2

Patch Changes

0.16.1

Patch Changes

0.16.0

Minor Changes

  • Migrated from the nuxi package to @nuxt/cli for improved compatibility with Nuxt 3.32.0 and to align with Nuxt's official CLI package structure.
    The runCommand function is now imported from @nuxt/cli instead of nuxi in both the features add and setup commands.

Patch Changes

0.15.17

Patch Changes

  • Updated dependency [email protected] to consola@catalog:
  • Updated dependency [email protected] to knitwork@catalog:
  • Updated dependency [email protected] to rimraf@catalog:
  • This is an internal change only. The packages now use the PNPM catalog feature to ensure dependencies use the identical version across packages.

0.15.16

Patch Changes

0.15.15

Patch Changes

0.15.14

Patch Changes

0.15.13

Patch Changes

0.15.12

Patch Changes

0.15.11

Patch Changes

0.15.10

Patch Changes

0.15.9

Patch Changes

0.15.8

Patch Changes

0.15.7

Patch Changes

0.15.6

Patch Changes

0.15.5

Patch Changes

0.15.4

Patch Changes

0.15.3

Patch Changes

  • Updated SCAYLE Resource Center references

0.15.2

Patch Changes

  • Updated dependency @inquirer/[email protected] to @inquirer/[email protected]
  • Updated dependency @oclif/[email protected] to @oclif/[email protected]
  • Updated dependency [email protected] to [email protected]
  • Fixed feature installation failure when copying files from cache directory.
    The CLI now able to reliably determine the source directory from the latest cached Storefront Application without loading the full Nuxt config. This prevents errors as the cache directory doesn't have dependencies installed, which resulted in errors previously. The target project still uses the full config loading to respect any custom srcDir configuration.
  • Fixed automatic loading of existing config values from saved config file in CLI commands.
    The CLI's preparse hook now correctly loads and applies saved configuration values, eliminating the need to re-enter previously stored flags when running commands. This resolves issues where the internal parser import was causing module resolution errors.
  • Improved resilience of file copying during feature installation.
    The file copy operations now gracefully handle missing source files and directories instead of crashing the entire installation process. When a file listed in the manifest doesn't exist in the cache, the CLI will log a skip message and continue copying other files. This prevents outdated or incorrect manifest entries from breaking the feature installation flow.
  • Resolved Storefront CLI feature installation failures that occurred when cached templates contained uninstalled dependencies.
    Users installing features via the Storefront CLI will no longer encounter "Cannot find module" errors. The CLI now properly handles cases where cached template files reference dependencies that aren't available in the target project, ensuring smooth feature installation across different project configurations.

0.15.1

Patch Changes

  • Resolved an issue where the internal parser could not be found, causing commands to fail when required arguments were missing. Resolved an issue where the internal parser could not be found, causing commands to fail when required arguments were missing.
  • Sanitized the Storyblok space ID to prevent errors caused by a leading # character when copied from the browser.

0.15.0

Minor Changes

  • Added new Storefront CLI command: setup cms
    The new setup cms command streamlines the configuration of CMS providers for SCAYLE Storefront Application projects. It automates the setup process for both Contentful and Storyblok, ensuring quick and efficient integration with minimal manual configuration.

    Required Flags


    The following flags are required for all providers:
    • --provider (-p): The CMS provider to use (contentful or storyblok)
    • --space-id (-s): The space ID of the CMS space to use

    Contentful-specific required flags:

    • --access-token: The access token for the CMS
    • --preview-token: Preview token for Contentful preview API access
    • --management-token: Management token for Contentful management API access

    The access and preview access token for Contentful can be found in your space's settings page, while the personal access token is located in your account settings. For further information, refer to the official Contentful documentation.

    Storyblok-specific required flags:

    • --access-token: The access token for the CMS
    • --personal-access-token: Personal access token for Storyblok management API

    The access token for Storyblok can be found on your space's settings page, while the personal access token is located in your account settings. For further information, refer to the official Storyblok documentation.

    Optional flag:

    • --import-content-model (-i): Import the content model into the CMS

    Key features include:
    • Support for both Contentful and Storyblok CMS providers
    • Automatic generation of environment variables with CMS-specific tokens and configuration
    • Automatic updates to nuxt.config.ts with the selected CMS provider configuration
    • Optional content model import feature allows you to populate CMS spaces with predefined content structures. Use this option only with empty CMS spaces, as it may overwrite any existing content models.
  • Updated to fetch available features automatically from the live repository. This ensures that the list of features is always up-to-date even when using an older CLI version.

Patch Changes

0.14.0

Minor Changes

  • Updated the git-rev flag in the deploy command to be git-ref. This name more accurately reflects its usage as it requires a ref rather than a revision. The previous name is deprecated as a result of this change, but is still usable.

Patch Changes

0.13.4

Patch Changes

0.13.3

Patch Changes

0.13.2

Patch Changes

0.13.1

Patch Changes

0.13.0

Minor Changes

  • Introduced the features command.
    sfcli features list can be used to list the available Storefront features for installation.
    sfcli features add can be used to install a feature into your Storefront Application project. This command is equivalent to and replaces the previous sfcli add command.

Patch Changes

0.12.2

Patch Changes

  • Fixed incorrect file paths in the search and product-details feature packages.

0.12.1

Patch Changes

0.12.0

Minor Changes

  • Updated new/changed components for the @scayle/storefront-promotions package.

0.11.1

Patch Changes

0.11.0

Minor Changes

  • Added support for @scayle/storefront-basket in the add command, enabling the copying of components and composables from the latest Storefront Application into the current project.

0.10.6

Patch Changes

0.10.5

Patch Changes

0.10.4

Patch Changes

0.10.3

Patch Changes

0.10.2

Patch Changes

0.10.1

Patch Changes

0.10.0

Minor Changes

  • Fixed an issue where the deploy command would get stuck in an infinite loop when there were no new log lines to fetch. Now, when there are no new logs, fetching logs will be stopped until the next update cycle.

Patch Changes

0.9.16

Patch Changes

0.9.14

Patch Changes

0.9.13

Patch Changes

0.9.12

Patch Changes

  • Added dependency [email protected]
  • Fix issue with missing @nuxt/cli dependency and switch back to nuxi.

0.9.11

Patch Changes

  • Added support for the updated translation file format introduced in Storefront Application v1.10.0.

0.9.10

Patch Changes

0.9.9

Patch Changes

  • Fix creation of i18n translation files for current Storefront Application

0.9.8

Patch Changes

0.9.7

Patch Changes

0.9.6

Patch Changes

0.9.5

Patch Changes

0.9.4

Patch Changes

0.9.3

Patch Changes

  • Fixed the hostname of the SCAYLE Storefront Platform API

0.9.2

Patch Changes

0.9.1

Patch Changes

0.9.0

Minor Changes

  • [CLI] Update the setup command to generate configuration using the ICU Local Id's as translation file name.

0.8.3

Patch Changes

0.8.2

Patch Changes

0.8.1

Patch Changes

0.8.0

Minor Changes

  • Removed the unused SFPromotionHeadline component from the 'files to add' list of the @scayle/storefront-promotion SDK.

0.7.0

Minor Changes

  • Extended the list with of supported Storefront SDKs of the add command to include the new packages '@scayle/storefront-navigation', '@scayle/storefront-search' and '@scayle/storefront-promotions'.

0.6.2

Patch Changes

0.6.1

Patch Changes

0.6.0

Minor Changes

  • A new --only-env flag has been added to the setup command to generate only the .env file.
    Since the .env file is not included in version control, developers need to generate it manually when cloning a fresh copy of the repository. This flag simplifies that process.

Patch Changes

0.5.6

Patch Changes

0.5.5

Patch Changes

0.5.4

Patch Changes

  • Updated the generation of shop configuration environment variables. The shop-specific variables are now placed directly after the example variables to maintain context and ensure that the most important settings appear near the top.

0.5.3

Patch Changes

  • Updated dependency [email protected] to [email protected]
  • Resolved an issue where the .env file was being generated incorrectly, with unresolved dynamic environment variables still present. This caused certain commands in the Storefront Application to fail.

0.5.2

Patch Changes

0.5.1

Patch Changes

0.5.0

Minor Changes

  • Add new Storefront CLI command: deploy
    The new deploy command simplifies the deployment of a Storefront Application project to the SCAYLE PaaS. It automates the process, ensuring that your storefront is quickly and efficiently deployed with minimal manual intervention.

Patch Changes

0.4.5

Patch Changes

0.4.4

Patch Changes

0.4.3

Patch Changes

0.4.2

Patch Changes

0.4.1

Patch Changes

0.4.0

Minor Changes

  • Added a new should-override flag to the setup command. When set, it automatically replaces existing .env and shops.ts files without prompting for confirmation.
    Usage

0.3.0

Minor Changes

  • Rename Storefront CLI flags from camelCase to kebab-case to ensure consistency with standard naming conventions.

0.2.2

Patch Changes

0.2.1

Patch Changes

0.2.0

Minor Changes

  • Support saving and loading flags to a config file. This allows you to store global and tenant-specific configurations like accessToken and adminApiToken, eliminating the need to input these values every time a command is executed.
    To use a config file place the ./scayle/config.json file either in your home directory or in the current working directory where commands are run. The structure of this config file should be as follows:

    When no config file is found, the command will prompt you to save the flags used in the current command within the current directory. This can be disabled by using the --no-config-file flag or setting the SCAYLE_CLI_NO_CONFIG_FILE environment variable to a truthy value.

0.1.5

Patch Changes

0.1.4

Patch Changes

0.1.3

Patch Changes

  • Updated the locale code adjustment logic to only modify the code when multiple shops share the same initial countryCode.
    Example: Countries with de code and en-US locale will now result in en-de code. This will result in shops to be created with en-de as code and not with multiple de.

0.1.2

Patch Changes

0.1.1

Patch Changes

0.1.0

Minor Changes

  • Added new Storefront CLI command: setup
    The new setup command streamlines the initial setup of a new SCAYLE Storefront Application project. It automatically creates tenant- and country-specific files, including:
    • .env file filled with correct environment variables according to the tenant and countries.
    • shops.ts config file that already includes all configuration for all added country shops.
    • Translation files that will be created out of the existing en-GB.json i18n file.

Patch Changes

0.0.10

Patch Changes

0.0.9

Patch Changes

0.0.8

Patch Changes

  • Added dependency @oclif/[email protected]
  • Added dependency @oclif/[email protected]
  • Removed dependency @oclif/plugin-plugins@^5
  • Improved the developer experience by adding functionality to list all available commands and handle command typos more gracefully, providing better error messages.
  • Updated the README.md file with recommended usage instructions to improve clarity and help developers get started more easily.

0.0.7

Patch Changes

0.0.6

Patch Changes

0.0.5

Patch Changes

0.0.4

Patch Changes

0.0.3

Patch Changes

  • Fixed an issue where the @scayle/storefront-cli package was missing the featurePackages.json in the dist folder.
  • Add the nuxi dependency to the @scayle/storefront-cli package to enable version-independent and Nuxt-context-independent command execution using npx @scayle/storefront-cli.

0.0.2

Patch Changes

  • This release introduces the initial version of the SCAYLE Storefront CLI (@scayle/storefront-cli), a powerful tool designed to streamline feature adoption within SCAYLE Storefront tenant projects. This addresses the challenge of integrating new features and updates delivered through independent feature packages, particularly when tenant projects are based on older versions of the SCAYLE Storefront Application.
    Key Features include:
    • Simplified Feature Integration: The add command automates the process of adding new features, including necessary UI components and dependencies. This leverages nuxi module add for seamless integration within Nuxt projects.
    • Preservation of Tenant Customizations: Intelligent conflict resolution prompts users to manage potential overwrites of existing components & files, ensuring tenant-specific code modifications are preserved. Alternatively, the CLI can generate copies of new components, facilitating side-by-side comparison and controlled updates.
    • Incremental Feature Adoption: Tenants can now adopt new features without requiring a full Storefront Application upgrade, reducing disruption and development overhead.
    • Efficient Component Delivery: While feature packages primarily contain composables and utilities, the CLI efficiently delivers associated components and tests by fetching those from the latest available SCAYLE Storefront Application release and extracting them during feature installation. This streamlines the integration process and minimizes manual file management.