npm package: @scayle/storefront-cli
Description: SCAYLE Storefront command line utility
Author: SCAYLE Commerce Engine
Latest version: 0.18.0

# @scayle/storefront-cli

<div align="center">
  <img src="https://cdn-prod.scayle.com/public/media/general/SCAYLE-Commerce-Engine-header.png" />
</div>

<div align="center">
  <h1>@scayle/storefront-cli</h1>
</div>

<div align="center">
  <h4><a href="https://www.scayle.com/">Website</a></h4>
</div>

<div align="center">
  A command-line tool that accelerates feature adoption in SCAYLE Storefront Application projects by simplifying the integration of new features and updates from the Storefront Application.
</div>
<br/>
<div align="center">
  <a href="https://www.npmjs.com/package/@scayle/storefront-cli"><img src="https://img.shields.io/npm/v/@scayle/storefront-cli/latest.svg?style=flat&colorB=007ec6" /></a>
  <a href="https://www.npmjs.com/package/@scayle/storefront-cli"><img src="https://img.shields.io/npm/dm/@scayle/storefront-cli.svg?style=flat&colorB=007ec6" /></a>
  <a href="https://www.npmjs.com/package/@scayle/storefront-cli"><img src="https://img.shields.io/badge/license-MIT-blue.svg" /></a>
  <a href="https://nuxt.com"><img src="https://img.shields.io/badge/Nuxt-18181B?logo=nuxt.js" /></a>
</div>

<!-- toc -->
* [@scayle/storefront-cli](#scaylestorefront-cli)
* [Using PNPM](#using-pnpm)
* [Using NPX](#using-npx)
<!-- tocstop -->

## Storefront CLI

The SCAYLE Storefront command-line interface (CLI) tool accelerates feature adoption in SCAYLE Storefront tenant projects by simplifying the integration of new features and updates from the Storefront Application.
It allows tenants to selectively add individual feature components, even if their project is based on an older Storefront Application version, avoiding the need for a full Storefront Application upgrade.

The CLI handles the complexities of component delivery and integration, allowing developers to focus on customizing and implementing the feature's functionality.
It automatically fetches the necessary components based on the selected feature and Storefront Application version, manages potential file conflicts, and optionally includes unit tests.\
This streamlined workflow significantly reduces manual effort and accelerates the overall development process.

## Usage

### Recommended Usage

To always use the current version of the CLI we recommend to use the package as remote package [pnpx](https://pnpm.io/cli/dlx) or [npx](https://docs.npmjs.com/cli/v9/commands/npx?v=true). This will always fetch the current version of the Storefront CLI.

```sh
# Using PNPM
pnpx @scayle/storefront-cli COMMAND

# Using NPX
npx @scayle/storefront-cli COMMAND
```

### Installed Usage

<!-- usage -->
```sh-session
$ npm install -g @scayle/storefront-cli
$ sfcli COMMAND
running command...
$ sfcli (--version)
@scayle/storefront-cli/0.18.0 linux-x64 node-v24.13.0
$ sfcli --help [COMMAND]
USAGE
  $ sfcli COMMAND
...
```
<!-- usagestop -->

## Commands

<!-- commands -->
* [`sfcli commands`](#sfcli-commands)
* [`sfcli deploy`](#sfcli-deploy)
* [`sfcli features add [PACKAGES]`](#sfcli-features-add-packages)
* [`sfcli features list`](#sfcli-features-list)
* [`sfcli help [COMMAND]`](#sfcli-help-command)
* [`sfcli setup`](#sfcli-setup)
* [`sfcli setup cms contentful`](#sfcli-setup-cms-contentful)
* [`sfcli setup cms contentstack`](#sfcli-setup-cms-contentstack)
* [`sfcli setup cms storyblok`](#sfcli-setup-cms-storyblok)

## `sfcli commands`

List all sfcli commands.

```
USAGE
  $ sfcli commands [--json] [-c id|plugin|summary|type... | --tree] [--deprecated] [-x | ] [--hidden]
    [--no-truncate | ] [--sort id|plugin|summary|type | ]

FLAGS
  -c, --columns=<option>...  Only show provided columns (comma-separated).
                             <options: id|plugin|summary|type>
  -x, --extended             Show extra columns.
      --deprecated           Show deprecated commands.
      --hidden               Show hidden commands.
      --no-truncate          Do not truncate output.
      --sort=<option>        [default: id] Property to sort by.
                             <options: id|plugin|summary|type>
      --tree                 Show tree of commands.

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  List all sfcli commands.
```

_See code: [@oclif/plugin-commands](https://github.com/oclif/plugin-commands/blob/4.1.45/src/commands/commands.ts)_

## `sfcli deploy`

The deploy command will initiate a new deployment to SCAYLE PaaS and and display the build logs.

```
USAGE
  $ sfcli deploy -t <value> -s <value> -e <value> --deploy-token <value> [--json] [--log-level
    debug|warn|error|info|trace] [-h] [--no-config-file] [-g <value>]

FLAGS
  -e, --env-key=<value>       (required) [env: SCAYLE_CLI_ENV_KEY] Env Key is needed for identifying the correct
                              environment.
  -g, --git-ref=<value>       [env: SCAYLE_CLI_GIT_REF] Git ref is used to checkout the specific version of the app that
                              should be deployed
  -h, --no-header             Disable initial header print for the CLI.
  -s, --shop-key=<value>      (required) [env: SCAYLE_CLI_SHOP_KEY] Shop Key is needed for identifying the correct shop.
  -t, --tenant-space=<value>  (required) [env: SCAYLE_CLI_TENANT_SPACE] Tenant Space is needed for identifying the
                              correct context within the SCAYLE Core System.
      --deploy-token=<value>  (required) [env: SCAYLE_CLI_DEPLOY_TOKEN] Deploy Token is needed to authenticate against
                              the SCAYLE PaaS System.
      --no-config-file        [env: SCAYLE_CLI_NO_CONFIG_FILE] Disable generating a config file.

GLOBAL FLAGS
  --json                Format output as json.
  --log-level=<option>  [default: info] Specify level for logging.
                        <options: debug|warn|error|info|trace>

DESCRIPTION
  The deploy command will initiate a new deployment to SCAYLE PaaS and and display the build logs.

EXAMPLES
  $ sfcli deploy
```

_See code: [src/commands/deploy.ts](https://github.com/scayle/storefront-cli/blob/v0.18.0/src/commands/deploy.ts)_

## `sfcli features add [PACKAGES]`

Adds a SCAYLE Storefront feature module to Storefront projects,

```
USAGE
  $ sfcli features add [PACKAGES] -a <value> [--json] [--log-level debug|warn|error|info|trace] [-h]
    [--no-config-file] [-c] [-f]

ARGUMENTS
  [PACKAGES]  Directly install one or more specific packages, bypassing the multi-select prompt.

FLAGS
  -a, --access-token=<value>  (required) Access Token for Storefront Application repository
  -c, --should-copy           Copy relevant feature module components and related files
  -f, --should-override       Override existing files while copying relevant feature module components and related files
  -h, --no-header             Disable initial header print for the CLI.
      --no-config-file        [env: SCAYLE_CLI_NO_CONFIG_FILE] Disable generating a config file.

GLOBAL FLAGS
  --json                Format output as json.
  --log-level=<option>  [default: info] Specify level for logging.
                        <options: debug|warn|error|info|trace>

DESCRIPTION
  Adds a SCAYLE Storefront feature module to Storefront projects,
  with an option to include the associated Vue components and unit tests.

EXAMPLES
  $ sfcli features add
```

_See code: [src/commands/features/add.ts](https://github.com/scayle/storefront-cli/blob/v0.18.0/src/commands/features/add.ts)_

## `sfcli features list`

Lists the available feature packages which can be installed with the add command

```
USAGE
  $ sfcli features list -a <value> [--json] [--log-level debug|warn|error|info|trace] [-h] [--no-config-file]

FLAGS
  -a, --access-token=<value>  (required) Access Token for Storefront Application repository
  -h, --no-header             Disable initial header print for the CLI.
      --no-config-file        [env: SCAYLE_CLI_NO_CONFIG_FILE] Disable generating a config file.

GLOBAL FLAGS
  --json                Format output as json.
  --log-level=<option>  [default: info] Specify level for logging.
                        <options: debug|warn|error|info|trace>

DESCRIPTION
  Lists the available feature packages which can be installed with the add command

EXAMPLES
  $ sfcli features list
```

_See code: [src/commands/features/list.ts](https://github.com/scayle/storefront-cli/blob/v0.18.0/src/commands/features/list.ts)_

## `sfcli help [COMMAND]`

Display help for sfcli.

```
USAGE
  $ sfcli help [COMMAND...] [-n]

ARGUMENTS
  [COMMAND...]  Command to show help for.

FLAGS
  -n, --nested-commands  Include all nested commands in the output.

DESCRIPTION
  Display help for sfcli.
```

_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/6.2.41/src/commands/help.ts)_

## `sfcli setup`

The setup command will guide the user through a series of interactive prompts to gather the necessary information for configuring the Storefront Application.

```
USAGE
  $ sfcli setup -t <value> -a <value> [--json] [--log-level debug|warn|error|info|trace] [-h]
    [--no-config-file] [-p <value>] [-o] [-e]

FLAGS
  -a, --admin-api-token=<value>  (required) Admin API token will be used for authentication and authorization when
                                 accessing data from the SCAYLE Core System.
  -e, --only-env                 Setup only local environment variable as part of a .env file and skips creation of shop
                                 config, as well as translation files.
  -h, --no-header                Disable initial header print for the CLI.
  -o, --should-override          Override existing files while copying relevant feature module components and related
                                 files
  -p, --parent-shop-key=<value>  Shop key to setup a shop directly.
  -t, --tenant-space=<value>     (required) Tenant Space is needed for identifying the correct context within the SCAYLE
                                 Core System.
      --no-config-file           [env: SCAYLE_CLI_NO_CONFIG_FILE] Disable generating a config file.

GLOBAL FLAGS
  --json                Format output as json.
  --log-level=<option>  [default: info] Specify level for logging.
                        <options: debug|warn|error|info|trace>

DESCRIPTION
  The setup command will guide the user through a series of interactive prompts to gather the necessary information for
  configuring the Storefront Application.

EXAMPLES
  $ sfcli setup
```

_See code: [src/commands/setup/index.ts](https://github.com/scayle/storefront-cli/blob/v0.18.0/src/commands/setup/index.ts)_

## `sfcli setup cms contentful`

Configures the Storefront Application to use Contentful as the CMS provider.

```
USAGE
  $ sfcli setup cms contentful -i true|false -s <value> --access-token <value> --preview-token <value> --management-token
    <value> [--json] [--log-level debug|warn|error|info|trace] [-h] [--no-config-file]

FLAGS
  -h, --no-header                      Disable initial header print for the CLI.
  -i, --import-content-model=<option>  (required) Import the content model in to the CMS. This command is only intended
                                       to be used with empty CMS spaces.
                                       <options: true|false>
  -s, --space-id=<value>               (required) The Contentful Space ID you want to use.
      --access-token=<value>           (required) Delivery API access token for Contentful. Used by the app to fetch
                                       published content.
      --management-token=<value>       (required) Content Management API access token for Contentful. Required for
                                       importing the content model.
      --no-config-file                 [env: SCAYLE_CLI_NO_CONFIG_FILE] Disable generating a config file.
      --preview-token=<value>          (required) Preview API access token for Contentful. Allows the app to fetch
                                       draft/unpublished content for preview purposes.

GLOBAL FLAGS
  --json                Format output as json.
  --log-level=<option>  [default: info] Specify level for logging.
                        <options: debug|warn|error|info|trace>

DESCRIPTION
  Configures the Storefront Application to use Contentful as the CMS provider.

EXAMPLES
  $ sfcli setup cms contentful
```

_See code: [src/commands/setup/cms/contentful.ts](https://github.com/scayle/storefront-cli/blob/v0.18.0/src/commands/setup/cms/contentful.ts)_

## `sfcli setup cms contentstack`

Configures the Storefront Application to use Contentstack as the CMS provider.

```
USAGE
  $ sfcli setup cms contentstack -i true|false -k <value> -d <value> -p <value> -r na|eu|au|azure-na|azure-eu|gcp-na|gcp-eu
    -e <value> -m <value> [--json] [--log-level debug|warn|error|info|trace] [-h] [--no-config-file] [-b <value>]

FLAGS
  -b, --branch=<value>                 [default: main] Branch UID used with Contentstack’s branch feature
  -d, --delivery-token=<value>         (required) Content Delivery Token used for fetching published content via Content
                                       Delivery API.
  -e, --environment=<value>            (required) Environment name in Contentstack determines which environment to use
                                       for content retrieval.
  -h, --no-header                      Disable initial header print for the CLI.
  -i, --import-content-model=<option>  (required) Import the content model in to the CMS. This command is only intended
                                       to be used with empty CMS spaces.
                                       <options: true|false>
  -k, --api-key=<value>                (required) Contentstack Stack API Key required to identify the target stack.
  -m, --management-token=<value>       (required) Contentstack Management Token required for importing the content model
                                       via the Management API.
  -p, --preview-token=<value>          (required) Content Preview Token used for fetching draft/preview content via
                                       Content Preview API.
  -r, --region=<option>                (required) Region for the stack
                                       <options: na|eu|au|azure-na|azure-eu|gcp-na|gcp-eu>
      --no-config-file                 [env: SCAYLE_CLI_NO_CONFIG_FILE] Disable generating a config file.

GLOBAL FLAGS
  --json                Format output as json.
  --log-level=<option>  [default: info] Specify level for logging.
                        <options: debug|warn|error|info|trace>

DESCRIPTION
  Configures the Storefront Application to use Contentstack as the CMS provider.

EXAMPLES
  $ sfcli setup cms contentstack
```

_See code: [src/commands/setup/cms/contentstack.ts](https://github.com/scayle/storefront-cli/blob/v0.18.0/src/commands/setup/cms/contentstack.ts)_

## `sfcli setup cms storyblok`

Configures the Storefront Application to use Storyblok as the CMS provider.

```
USAGE
  $ sfcli setup cms storyblok -i true|false -s <value> --access-token <value> [--json] [--log-level
    debug|warn|error|info|trace] [-h] [--no-config-file] [-p <value>]

FLAGS
  -h, --no-header                      Disable initial header print for the CLI.
  -i, --import-content-model=<option>  (required) Import the content model in to the CMS. This command is only intended
                                       to be used with empty CMS spaces.
                                       <options: true|false>
  -p, --personal-access-token=<value>  The Storyblok Personal Access Token for the Management API. Required for
                                       importing the content model.
  -s, --space-id=<value>               (required) The unique Space ID for your Storyblok space. This identifies the
                                       specific Storyblok space to connect to.
      --access-token=<value>           (required) The Storyblok Preview or Public Access Token used for the Content
                                       Delivery API.
      --no-config-file                 [env: SCAYLE_CLI_NO_CONFIG_FILE] Disable generating a config file.

GLOBAL FLAGS
  --json                Format output as json.
  --log-level=<option>  [default: info] Specify level for logging.
                        <options: debug|warn|error|info|trace>

DESCRIPTION
  Configures the Storefront Application to use Storyblok as the CMS provider.

EXAMPLES
  $ sfcli setup cms storyblok
```

_See code: [src/commands/setup/cms/storyblok.ts](https://github.com/scayle/storefront-cli/blob/v0.18.0/src/commands/setup/cms/storyblok.ts)_
<!-- commandsstop -->

## License

Licensed under the [MIT License](https://opensource.org/license/mit/)

## What is SCAYLE?

[SCAYLE](https://scayle.com) is a full-featured e-commerce software solution that comes with flexible APIs.
Within SCAYLE, you can manage all aspects of your shop, such as products, stocks, customers, and transactions.

Learn more about [SCAYLE’s architecture](https://scayle.dev/en/core-documentation/welcome-to-scayle/getting-started) and commerce modules in the Docs.

## Other channels

- [LinkedIn](https://www.linkedin.com/company/scaylecommerce/)
- [Jobs](https://careers.smartrecruiters.com/ABOUTYOUGmbH/scayle)