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

setup cms

Overview

The setup cms command is an interactive tool that streamlines the setup of your CMS integration by generating the necessary configuration files for your Nuxt application.

The process begins by validating that you're in a valid Nuxt application directory. You can then choose to run the command interactively, where it will prompt you for the required values, or provide all the necessary information directly via command-line flags.

Once the command has all the inputs, it automatically performs three key tasks: it configures the CMS provider within your nuxt.config.ts, sets up all the essential CMS environment variables for local development, and uploads the content model to your CMS space if this feature was enabled.

Usage

Flags

  • -p, --provider: (Required): Sets the CMS provider that should be used.
  • -s, --space-id: (Required): Identifies the CMS space that should be used.
  • --access-token: (Required): Sets the access token that is used for fetching content.
  • -i, --import-content-model: (Required) Whether the content model should be imported or not. Options: true / false

Contentful specific flags

  • --preview-token: (Required when the Contentful provider was chosen) Sets the token that is used for fetching preview content.
  • --management-token: (Required when the Contentful provider was chosen) Sets the token that is used for authentication when interacting with the management API

Storyblok specific flags

  • --personal-access-token: (Required when the Storyblok provider was chosen) Sets the token that is used for authentication when interacting with the management API