npm.io
1.8.5 • Published 1 week ago

@contentstack/cli-cm-import-setup

Licence
MIT
Version
1.8.5
Deps
10
Size
111 kB
Vulns
0
Weekly
0
Stars
14

@contentstack/cli-cm-import-setup

It is Contentstack’s CLI plugin to import content in the stack. To learn how to export and import content in Contentstack, refer to the Migration guide.

License

To switch regions, use:

$ csdx config:set:region [EU | AZURE-NA | AZURE-EU]

Usage

$ npm install -g @contentstack/cli-cm-import-setup
$ csdx COMMAND
running command...
$ csdx (--version)
@contentstack/cli-cm-import-setup/1.8.5 linux-x64 node-v22.23.0
$ csdx --help [COMMAND]
USAGE
  $ csdx COMMAND
...

Commands

csdx cm:stacks:import-setup [-k <value>] [-d <value>] [-a <value>] [--modules <value,value>]

Helps to generate mappers and backup folder for importing (overwriting) specific modules

USAGE
  $ csdx cm:import-setup cm:stacks:import-setup [-k <value>] [-d <value>] [-a <value>] [--modules <value,value>]

FLAGS
  -B, --branch=<value>         The name of the branch where you want to import your content. If you don't mention the
                               branch name, then by default the content will be imported to the main branch.
  -a, --alias=<value>          The management token of the destination stack where you will import the content.
  -d, --data-dir=<value>       The path or the location in your file system where the content, you intend to import, is
                               stored. For example, -d "C:\Users\Name\Desktop\cli\content". If the export folder has
                               branches involved, then the path should point till the particular branch. For example,
                               “-d "C:\Users\Name\Desktop\cli\content\branch_name"
  -k, --stack-api-key=<value>  API key of the target stack
      --branch-alias=<value>   Specify the branch alias where you want to import your content. If not specified, the
                               content is imported into the main branch by default.
      --module=<option>...     [optional] Specify the modules/module to import into the target stack. currently options
                               are global-fields, content-types, entries
                               <options: global-fields|content-types|entries>

DESCRIPTION
  Helps to generate mappers and backup folder for importing (overwriting) specific modules

ALIASES
  $ csdx cm:import-setup

EXAMPLES
  $ csdx cm:stacks:import-setup --stack-api-key <target_stack_api_key> --data-dir <path/of/export/destination/dir> --modules <module_name, module_name>

  $ csdx cm:stacks:import-setup -k <target_stack_api_key> -d <path/of/export/destination/dir> --modules <module_name, module_name>

  $ csdx cm:stacks:import-setup -k <target_stack_api_key> -d <path/of/export/destination/dir> --modules <module_name, module_name> -b <branch_name>

csdx cm:stacks:import-setup [-k <value>] [-d <value>] [-a <value>] [--modules <value,value>]

Helps to generate mappers and backup folder for importing (overwriting) specific modules

USAGE
  $ csdx cm:stacks:import-setup [-k <value>] [-d <value>] [-a <value>] [--modules <value,value>]

FLAGS
  -B, --branch=<value>         The name of the branch where you want to import your content. If you don't mention the
                               branch name, then by default the content will be imported to the main branch.
  -a, --alias=<value>          The management token of the destination stack where you will import the content.
  -d, --data-dir=<value>       The path or the location in your file system where the content, you intend to import, is
                               stored. For example, -d "C:\Users\Name\Desktop\cli\content". If the export folder has
                               branches involved, then the path should point till the particular branch. For example,
                               “-d "C:\Users\Name\Desktop\cli\content\branch_name"
  -k, --stack-api-key=<value>  API key of the target stack
      --branch-alias=<value>   Specify the branch alias where you want to import your content. If not specified, the
                               content is imported into the main branch by default.
      --module=<option>...     [optional] Specify the modules/module to import into the target stack. currently options
                               are global-fields, content-types, entries
                               <options: global-fields|content-types|entries>

DESCRIPTION
  Helps to generate mappers and backup folder for importing (overwriting) specific modules

ALIASES
  $ csdx cm:import-setup

EXAMPLES
  $ csdx cm:stacks:import-setup --stack-api-key <target_stack_api_key> --data-dir <path/of/export/destination/dir> --modules <module_name, module_name>

  $ csdx cm:stacks:import-setup -k <target_stack_api_key> -d <path/of/export/destination/dir> --modules <module_name, module_name>

  $ csdx cm:stacks:import-setup -k <target_stack_api_key> -d <path/of/export/destination/dir> --modules <module_name, module_name> -b <branch_name>

See code: src/commands/cm/stacks/import-setup.ts

Keywords