Skip to main content
The evershop seed command populates your EverShop store with demo data including products, categories, collections, pages, and widgets.

Usage

evershop seed [options]

Options

--attributes
boolean
default:"false"
Seed product attributes (color, size, material, etc.)Alias: -a
--categories
boolean
default:"false"
Seed product categoriesAlias: -c
--collections
boolean
default:"false"
Seed product collectionsAlias: --col
--products
boolean
default:"false"
Seed demo products with imagesAlias: -p
--widgets
boolean
default:"false"
Seed CMS widgetsAlias: -w
--pages
boolean
default:"false"
Seed CMS pagesAlias: --pg
--all
boolean
default:"false"
Seed all demo data (attributes, categories, collections, products, widgets, pages)

Examples

Seed All Demo Data

evershop seed --all
This will seed:
  • Product attribute groups and attributes
  • Categories
  • Collections
  • Demo products with images
  • CMS widgets
  • CMS pages

Seed Specific Data Types

Seed only products and categories:
evershop seed --products --categories
Seed only CMS content:
evershop seed --pages --widgets

Using Aliases

evershop seed -a -c -p  # Attributes, categories, and products

What Gets Seeded

Attributes

Creates a demo attribute group with common product attributes:
  • Color - Select attribute with options (Red, Blue, Green, etc.)
  • Size - Select attribute with options (S, M, L, XL)
  • Material - Select attribute (Cotton, Polyester, etc.)

Categories

Creates a sample category hierarchy:
  • Men’s Clothing
  • Women’s Clothing
  • Accessories
  • Electronics

Collections

Creates featured collections:
  • New Arrivals
  • Best Sellers
  • Sale Items

Products

Seeds demo products with:
  • Product names and descriptions
  • SKUs and pricing
  • Product images (downloaded from demo URLs)
  • Attribute values
  • Category assignments
  • Inventory levels

Pages

Creates sample CMS pages:
  • About Us
  • Privacy Policy
  • Terms of Service
  • Shipping Information

Widgets

Creates demo widgets:
  • Hero banners
  • Featured product widgets
  • Text blocks

Prerequisites

The seed command requires a working database connection. Make sure you’ve run evershop install first.
Before running seed:
  1. Complete installation: evershop install
  2. Configure database connection
  3. Ensure database is accessible

Use Cases

Development & Testing

Seed demo data for development:
# Fresh install
evershop install

# Add demo data
evershop seed --all

Demo Stores

Create a demo store for presentations:
evershop seed --all

Testing Specific Features

Test product catalog features:
evershop seed --products --categories --attributes
Test CMS features:
evershop seed --pages --widgets

Data Source

Demo data is seeded from:
  • Data files - Located in packages/evershop/src/bin/seed/data/
  • Image URLs - Product images are downloaded from external URLs
  • Predefined structures - Categories and attributes follow common ecommerce patterns

Seeding Process

The seed command:
  1. Creates attribute group (if seeding attributes or products)
  2. Seeds attributes (color, size, material)
  3. Seeds categories (product category tree)
  4. Seeds collections (featured collections)
  5. Seeds products (demo products with images)
  6. Seeds widgets (CMS widgets)
  7. Seeds pages (CMS pages)

Image Handling

Product images are:
  • Downloaded from external URLs
  • Processed and optimized
  • Stored in the media directory
  • Associated with products
Image downloading requires internet connectivity and may take time depending on your connection speed.

Idempotency

The seed command is not idempotent. Running it multiple times will create duplicate data.
To re-seed:
  1. Drop and recreate the database
  2. Run evershop install
  3. Run evershop seed --all

Error Handling

If seeding fails:
# Error example
Seeding failed: Connection to database failed
Common issues:
  • Database not configured - Run evershop install first
  • Database connection error - Check database credentials
  • Missing permissions - Ensure database user has write permissions
  • Network issues - Images may fail to download if offline

Performance

Seeding all data typically takes:
  • Attributes & Categories: < 1 second
  • Collections: < 1 second
  • Products: 30-60 seconds (depends on image downloads)
  • Pages & Widgets: < 1 second
Use specific flags instead of --all if you only need certain data types. This speeds up the seeding process.

Best Practices

  1. Fresh database - Seed on a fresh installation to avoid conflicts
  2. Development only - Don’t use seed command in production
  3. Selective seeding - Only seed what you need for testing
  4. Clear before re-seed - Drop database before re-seeding

install

Run before seeding to set up database

dev

Start development server to view seeded data

See Also

Build docs developers (and LLMs) love