Nomenclature Processing Machine

    @contentstack/cli-cm-seed

    1.0.7 • Public • Published

    Description

    The “seed” command in Contentstack CLI allows users to import content to your stack, from Github repositories. It's an effective command that can help you to migrate content to your stack with minimal steps.

    To import content to your stack, you can choose from the following two sources:

    Contentstack’s organization: In this organization, we have provided sample content, which you can import directly to your stack using the seed command.

    Github’s repository: You can import content available on Github’s repository belonging to an organization or an individual.

    Commands

    csdx cm:seed

    Create a Stack from existing content types, entries, assets, etc

    USAGE
      $ csdx cm:seed
    
    OPTIONS
      -n, --stack-name=stack-name  Name of a new stack that needs to be created.
      -o, --org=org                Provide Organization UID to create a new stack
      -r, --repo=repo              GitHub account or GitHub account/repository
      -s, --stack=stack            Provide stack UID to seed content to
    
    EXAMPLES
      $ csdx cm:seed
      $ csdx cm:seed -r "account"
      $ csdx cm:seed -r "account/repository"
      $ csdx cm:seed -r "account/repository" -s "stack-uid" //seed content into specific stack
      $ csdx cm:seed -r "account/repository" -o "your-org-uid" -n "stack-name" //create a new stack in given org uid
    

    See code: src/commands/cm/seed.ts

    Advanced Flags

    The following flags allow you to host and import Stacks from your own GitHub repository. The account name can be a personal user account, organization account, or enterprise account.

      $ csdx cm:seed -r "account/repository"
    

    Step 1. Export a Stack

    Identify a Stack that you would like to export. This stack might be used in conjunction with a sample web site or mobile app you have created.

    Now, run csdx cm:export against it. The following documentation explains the Export Plugin.

    In most cases, running csdx cm:export -A or csdx cm:export -a "management token" should work for you.

    The csdx cm:seed plugin uses the same libraries as csdx cm:import.

    Step 2. GitHub

    Once the Stack is exported:

    • Create a GitHub repository.
      • By convention, your repository name should be prefixed with stack-. For example: stack-your-starter-app. Doing so will allow the stack names to be found by the interactive prompt when running csdx cm:seed -r "account". This step is optional. You can fully qualify the repository name if required: csdx cm:seed -r "account/repo.
    • Create a folder named stack within the newly created GitHub repository
    • Take the content from Step 1 and commit it to the stack folder
    • Create a Release

    The latest release will be downloaded and extracted, when a user attempts to install a Stack using:

    $ csdx cm:seed -r "account"
    $ csdx cm:seed -r "account/repository"
    

    Documentation

    To get more detailed documentation of this command, visit the Seed command documentation on our docs.

    Install

    npm i @contentstack/cli-cm-seed

    DownloadsWeekly Downloads

    120

    Version

    1.0.7

    License

    MIT

    Unpacked Size

    33.3 kB

    Total Files

    21

    Last publish

    Collaborators

    • shafeeqd959
    • mynk
    • kego1992
    • roshangade
    • iyerrama29
    • uukkoji
    • cloudaccounts
    • gautam.lodhiya
    • hiteshshetty