npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

cs-cli-1-cm-seed

v1.7.4

Published

create a Stack from existing content types, entries, assets, etc.

Downloads

3

Readme

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:stacks:seed [--repo <value>] [--org <value>] [-k <value>] [-n <value>] [-y <value>] [-s <value>]

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

USAGE
  $ csdx cm:stacks:seed [--repo <value>] [--org <value>] [-k <value>] [-n <value>] [-y <value>] [-s <value>]

FLAGS
  -a, --alias=<value>          Alias of the management token
  -k, --stack-api-key=<value>  Provide stack api key to seed content to
  -n, --stack-name=<value>     Name of a new stack that needs to be created.
  -o, --org=<value>            Provide Organization UID to create a new stack
  -r, --repo=<value>           GitHub account or GitHub account/repository
  -s, --stack=<value>          Provide stack UID to seed content to
  -y, --yes=<value>            [Optional] Skip stack confirmation

DESCRIPTION
  Create a stack from existing content types, entries, assets, etc

ALIASES
  $ csdx cm:seed

EXAMPLES
  $ csdx cm:stacks:seed

  $ csdx cm:stacks:seed --repo "account"

  $ csdx cm:stacks:seed --repo "account/repository"

  $ csdx cm:stacks:seed --repo "account/repository" --stack-api-key "stack-api-key" //seed content into specific stack

  $ csdx cm:stacks:seed --repo "account/repository" --org "your-org-uid" --stack-name "stack-name" //create a new stack in given org uid

csdx cm:stacks:seed [--repo <value>] [--org <value>] [-k <value>] [-n <value>] [-y <value>] [-s <value>]

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

USAGE
  $ csdx cm:stacks:seed [--repo <value>] [--org <value>] [-k <value>] [-n <value>] [-y <value>] [-s <value>]

FLAGS
  -a, --alias=<value>          Alias of the management token
  -k, --stack-api-key=<value>  Provide stack api key to seed content to
  -n, --stack-name=<value>     Name of a new stack that needs to be created.
  -o, --org=<value>            Provide Organization UID to create a new stack
  -r, --repo=<value>           GitHub account or GitHub account/repository
  -s, --stack=<value>          Provide stack UID to seed content to
  -y, --yes=<value>            [Optional] Skip stack confirmation

DESCRIPTION
  Create a stack from existing content types, entries, assets, etc

ALIASES
  $ csdx cm:seed

EXAMPLES
  $ csdx cm:stacks:seed

  $ csdx cm:stacks:seed --repo "account"

  $ csdx cm:stacks:seed --repo "account/repository"

  $ csdx cm:stacks:seed --repo "account/repository" --stack-api-key "stack-api-key" //seed content into specific stack

  $ csdx cm:stacks:seed --repo "account/repository" --org "your-org-uid" --stack-name "stack-name" //create a new stack in given org uid

See code: src/commands/cm/stacks/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.