Seeding a New Stack with CLI
This guide demonstrates how to create a new stack in Contentstack and seed it with content from a GitHub repository using the Contentstack Command-Line Interface (CLI).
Prerequisites
Ensure you have the following before starting:
- A Contentstack account with English set as the master language.
- Terminal access with a package manager installed (e.g., npm).
- Knowledge of the region hosting your Contentstack instance (AWS, Azure, or Google Cloud; US or Europe).
- Your Contentstack organization UID.
Installing the Contentstack CLI
You can install the CLI globally or run it directly using npx:
npm install -g @contentstack/cli
Or run directly without global install
npx @contentstack/cli
Configuring the CLI
Step 1: Set Your Region
Configure the CLI with the hosting region:
csdx config:set:region
Select your region (e.g., AWS Europe).
Step 2: Authentication
Log into Contentstack with your email and password:
csdx auth:login
Alternatively, you can store management tokens for persistent authentication. Check the official documentation for more details.
Creating and Seeding a Stack
Use the stack seed command to import content from a GitHub repository:
csdx stack:seed --repo github-repository-url --org organization-uid --stack new-stack-name
Replace placeholders:
- <GitHub-Repository-URL>: URL of the GitHub repository containing your seed content.
- <Organization-UID>: Your Contentstack organization UID.
- <New-Stack-Name>: Name for your new stack.
Execute the command to create and seed your stack.
Verify Stack Creation
After the import completes, log in to your Contentstack account to inspect and verify the newly created stack.
Additional Resources
Related Content

Understanding Branches
Explainer5m 34s
Understanding the Dashboard
Explainer2m 54s
Understanding Organizations & Stacks
Explainer2m 15s
Understanding Automate
Explainer9m 39sExploring the JSON Rich Text Editor
Coding16m 40sContentstack Live Preview Under the Hood
Coding4m 17s
A Simple PIM Setup for Contentstack
Coding8m 34s
Understanding Contentstack
Explainer4m 6s
Contentstack on Contentstack: Academy
Webinar3m 59s
Fall 2024 Product Update
Change Log20m 7s
Understanding Releases
Explainer5m 25s
Using Search
Explainer5m 32s
Understanding Timeline
Explainer5m 49s
Understanding Live Preview
Explainer3m 59s