Skip to content

Overview

Import products, collections, images and prices from an AI-generated catalog, or load YAML produced by an external fetch step into Sylius fixtures. Provided by sylius-starter/import.

  1. Make sure you have already set up your Sylius application using the castor docker:service:install sylius command.

  2. Configure AI in .castor/.env (created automatically when you run the first import command). You can copy the default values from .castor/.env.example.

You can also create a .castor/.env.local file for your sensitive values or local overrides.

VariableDefaultDescription
AI_PROVIDERopenrouterollama (local) or openrouter
AI_MODELprovider-specificText / structured-output model
AI_IMAGE_MODELprovider-specificImage generation model (AI import only)
AI_BASE_URLhttp://127.0.0.1:11434Ollama URL (ignored for OpenRouter)
AI_API_KEY—Required when AI_PROVIDER=openrouter
  1. Produce the catalog YAML under .castor/import/var/{project-slug}/: generate it with AI, or fetch it from an existing website.
  2. Generate the Sylius fixtures from that YAML, then load them.

To reuse a catalog, build it as a dataset instead (catalog and images, downloadable as a zip), or pick a ready-made one from sylius-starter/datasets, then create shops from it with castor sylius:import:shop:create.

Terminal window
castor sylius:import:list # list the imported shops
castor sylius:import:delete organic-kids # delete a shop, its files and its channel catalog