docs
  1. Storefront Application
  2. Storefront Cli
  3. Setup

setup

Overview

The setup command is an interactive configuration tool that helps setup your Storefront Application by automatically fetching shop data from the SCAYLE Core System and generating the necessary configuration files.

The command first validates that the it is run within a valid Nuxt application directory, then connects to the SCAYLE Admin API using the provided tenant space and admin API token to retrieve available shops. Users can either interactively select a shop from the available options or directly specify a shop key using the --parent-shop-key flag.

It then generates essential configuration files including a .env file with tenant and shop settings, a shops.ts configuration file with shop-specific settings, and i18n translation files based on the shop's supported countries. However, if you only want to generate the .env you can skip the other file generation with the --only-env flag.

Finally, it runs Nuxt's type generation to ensure TypeScript compatibility and provides helpful next steps with links to additional configuration guides.

Usage

Flags

  • -t, --tenant-space=<value>: (Required) Identifies the correct context within the SCAYLE Core System.
  • -a, --admin-api-token=<value>: (Required) The Admin API token used for authentication.
  • -p, --parent-shop-key=<value>: Sets up a specific shop directly.
  • -o, --should-override: Overrides existing configuration files.
  • -e, --only-env: Only sets up the local .env file and skips shop config and translation files.

Example