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

Building Your First Agent in Agent OS
Course37m 29s
Agent OS Foundations
Course26m 40s
Understanding Assets
Explainer4m 41s
Contentstack Assets Foundations
Course39m 32s
Live Preview: Editing with Confidence
Explainer2m 3s
Understanding Content Versions
Explainer3m 28s
Understanding Localization
Explainer3m 58sProject Managing a Contentstack Implementation
Course37m 56s
Using Workflows
Course7m 45s
Understanding Branches
Explainer5m 34s
Creating and Managing Content
Course20m 48s
Publishing Content
Course8m 29s
Structuring Content in Contentstack
Course26m 2s
Understanding the Dashboard
Explainer2m 54s
Understanding Organizations & Stacks
Explainer2m 15s