@contentstack/cli-cm-clone

1.13.0 • Public • Published

@contentstack/cli-cm-clone

It is Contentstack’s CLI plugin to clone a stack. Using this command, you can export a stack’s content/schema to a new or existing stack. Refer to the Clone a Stack documentation to learn more.

Usage

$ npm install -g @contentstack/cli-cm-clone
$ csdx COMMAND
running command...
$ csdx (--version)
@contentstack/cli-cm-clone/1.13.0 darwin-arm64 node-v22.2.0
$ csdx --help [COMMAND]
USAGE
  $ csdx COMMAND
...
$ npm install -g @contentstack/cli-cm-clone
$ csdx COMMAND
running command...
$ csdx --help [COMMAND]
USAGE
  $ csdx COMMAND
...

Commands

csdx cm:stacks:clone [--source-branch <value>] [--target-branch <value>] [--source-management-token-alias <value>] [--destination-management-token-alias <value>] [-n <value>] [--type a|b] [--source-stack-api-key <value>] [--destination-stack-api-key <value>] [--import-webhook-status disable|current]

Clone data (structure/content or both) of a stack into another stack

USAGE
  $ csdx cm:stacks:clone [--source-branch <value>] [--target-branch <value>] [--source-management-token-alias <value>]
    [--destination-management-token-alias <value>] [-n <value>] [--type a|b] [--source-stack-api-key <value>]
    [--destination-stack-api-key <value>] [--import-webhook-status disable|current]

FLAGS
  -c, --config=<value>                          Path for the external configuration
  -n, --stack-name=<value>                      Name for the new stack to store the cloned content.
  -y, --yes                                     [Optional] Override marketplace prompts
  --destination-management-token-alias=<value>  Source API key of the target stack token alias.
  --destination-stack-api-key=<value>           Destination stack API Key
  --import-webhook-status=<option>              [default: disable] [Optional] Webhook state
                                                <options: disable|current>
  --skip-audit                                  Skips the audit fix.
  --source-branch=<value>                       Branch of the source stack.
  --source-management-token-alias=<value>       Source API key of the target stack token alias.
  --source-stack-api-key=<value>                Source stack API Key
  --target-branch=<value>                       Branch of the target stack.
  --type=<option>                               Type of data to clone
                                                a) Structure (all modules except entries & assets)
                                                b) Structure with content (all modules including entries & assets)

                                                <options: a|b>

DESCRIPTION
  Clone data (structure/content or both) of a stack into another stack
  Use this plugin to automate the process of cloning a stack in few steps.


ALIASES
  $ csdx cm:stack-clone

EXAMPLES
  $ csdx cm:stacks:clone

  $ csdx cm:stacks:clone --source-branch <source-branch-name> --target-branch <target-branch-name> --yes

  $ csdx cm:stacks:clone --source-stack-api-key <apiKey> --destination-stack-api-key <apiKey>

  $ csdx cm:stacks:clone --source-management-token-alias <management token alias> --destination-management-token-alias <management token alias>

  $ csdx cm:stacks:clone --source-branch --target-branch --source-management-token-alias <management token alias> --destination-management-token-alias <management token alias>

  $ csdx cm:stacks:clone --source-branch --target-branch --source-management-token-alias <management token alias> --destination-management-token-alias <management token alias> --type <value a or b>

csdx cm:stacks:clone [--source-branch <value>] [--target-branch <value>] [--source-management-token-alias <value>] [--destination-management-token-alias <value>] [-n <value>] [--type a|b] [--source-stack-api-key <value>] [--destination-stack-api-key <value>] [--import-webhook-status disable|current]

Clone data (structure/content or both) of a stack into another stack

USAGE
  $ csdx cm:stacks:clone [--source-branch <value>] [--target-branch <value>] [--source-management-token-alias <value>]
    [--destination-management-token-alias <value>] [-n <value>] [--type a|b] [--source-stack-api-key <value>]
    [--destination-stack-api-key <value>] [--import-webhook-status disable|current]

FLAGS
  -c, --config=<value>                          Path for the external configuration
  -n, --stack-name=<value>                      Name for the new stack to store the cloned content.
  -y, --yes                                     [Optional] Override marketplace prompts
  --destination-management-token-alias=<value>  Source API key of the target stack token alias.
  --destination-stack-api-key=<value>           Destination stack API Key
  --import-webhook-status=<option>              [default: disable] [Optional] Webhook state
                                                <options: disable|current>
  --skip-audit                                  Skips the audit fix.
  --source-branch=<value>                       Branch of the source stack.
  --source-management-token-alias=<value>       Source API key of the target stack token alias.
  --source-stack-api-key=<value>                Source stack API Key
  --target-branch=<value>                       Branch of the target stack.
  --type=<option>                               Type of data to clone
                                                a) Structure (all modules except entries & assets)
                                                b) Structure with content (all modules including entries & assets)

                                                <options: a|b>

DESCRIPTION
  Clone data (structure/content or both) of a stack into another stack
  Use this plugin to automate the process of cloning a stack in few steps.


ALIASES
  $ csdx cm:stack-clone

EXAMPLES
  $ csdx cm:stacks:clone

  $ csdx cm:stacks:clone --source-branch <source-branch-name> --target-branch <target-branch-name> --yes

  $ csdx cm:stacks:clone --source-stack-api-key <apiKey> --destination-stack-api-key <apiKey>

  $ csdx cm:stacks:clone --source-management-token-alias <management token alias> --destination-management-token-alias <management token alias>

  $ csdx cm:stacks:clone --source-branch --target-branch --source-management-token-alias <management token alias> --destination-management-token-alias <management token alias>

  $ csdx cm:stacks:clone --source-branch --target-branch --source-management-token-alias <management token alias> --destination-management-token-alias <management token alias> --type <value a or b>

See code: src/commands/cm/stacks/clone.js

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.13.01,298latest

Version History

VersionDownloads (Last 7 Days)Published
1.13.01,298
1.12.0114
1.11.11
1.11.093
1.10.733
1.10.61
1.10.5122
1.10.41
1.10.389
1.10.21
1.10.11
1.10.01
1.9.061
1.8.02
1.7.11
1.7.01
1.6.11
1.6.01
1.5.11
1.5.0162
1.4.171
1.4.161
1.4.159
1.4.141
1.4.131
1.4.121
1.4.111
1.4.102
1.4.91
1.4.81
1.4.71
1.4.61
1.4.51
1.4.41
1.4.31
1.4.21
1.4.11
1.4.01
1.3.01
1.2.012
1.1.68
1.1.51
1.1.41
1.1.31
1.1.21
1.1.01
1.0.01
0.1.0-beta.61,102
0.1.0-beta.52
0.1.0-beta.41
0.1.0-beta.31
0.1.0-beta.21
0.1.0-beta.114
0.1.0-beta1

Package Sidebar

Install

npm i @contentstack/cli-cm-clone

Weekly Downloads

3,161

Version

1.13.0

License

MIT

Unpacked Size

48 kB

Total Files

9

Last publish

Collaborators

  • aravindbuilt
  • mynk
  • cloudaccounts