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 🙏

© 2026 – Pkg Stats / Ryan Hefner

medusa-fashion-product-seeder

v0.1.4

Published

Reusable fashion-focused Medusa product seeder with generated products, variants, and images.

Readme

medusa-fashion-product-seeder

A reusable Medusa fashion catalog generator with both:

  • a library API for custom seed scripts
  • a CLI for seeding or clearing products from an installed node module

It generates a deterministic demo catalog with:

  • 100 products by default
  • 1-4 variants per product
  • multiple images per product
  • reusable fashion category definitions
  • configurable image builder, brand name, count, and pricing

Install

Install it in your Medusa backend project:

pnpm add medusa-fashion-product-seeder

CLI

The package ships with a CLI that runs against a Medusa backend directory.

From inside your backend directory:

pnpm exec medusa-fashion-product-seeder seed

From a monorepo root:

pnpm exec medusa-fashion-product-seeder seed --project-dir ./apps/backend

Available commands:

pnpm exec medusa-fashion-product-seeder seed --project-dir ./apps/backend --count 100
pnpm exec medusa-fashion-product-seeder clear --project-dir ./apps/backend
pnpm exec medusa-fashion-product-seeder reset --project-dir ./apps/backend --count 100
pnpm exec medusa-fashion-product-seeder clear --project-dir ./apps/backend --all --confirm

Behavior notes:

  • seed creates fashion categories if they do not already exist.
  • seed uses the handle prefix fashion-seeder by default so the generated catalog is namespaced.
  • clear deletes only products created with that prefix unless you pass --all --confirm.
  • clear uses Medusa's delete workflow, so products are removed from the active catalog using Medusa's normal deletion behavior.
  • reset clears the prefixed catalog and seeds it again.
  • if your backend uses medusa-config.ts, the CLI automatically registers ts-node from the target project before bootstrapping Medusa.

Useful options:

--project-dir <path>
--count <number>
--brand <name>
--handle-prefix <prefix>
--all
--confirm

Library API

Use the library API when you want to keep full control inside your own Medusa seed script.

import {
  DEFAULT_FASHION_CATEGORIES,
  buildFashionCatalogProducts,
  mapFashionCategoryIdsByName,
} from "medusa-fashion-product-seeder"

const { result: categories } = await createProductCategoriesWorkflow(container).run({
  input: {
    product_categories: DEFAULT_FASHION_CATEGORIES,
  },
})

const categoryIdByName = mapFashionCategoryIdsByName(categories)

const products = buildFashionCatalogProducts({
  count: 100,
  brand: "North Studio",
  shippingProfileId: shippingProfile.id,
  salesChannelId: defaultSalesChannel.id,
  categoryIdByName,
})

await createProductsWorkflow(container).run({
  input: { products },
})

Custom images

By default, the package uses placehold.co image URLs so the catalog works out of the box.

You can swap in your own CDN, Cloudinary, S3, or static asset pipeline:

const products = buildFashionCatalogProducts({
  shippingProfileId,
  salesChannelId,
  categoryIdByName,
  imageBuilder: ({ handle, themeLabel, productIndex }) => [
    `https://cdn.example.com/products/${handle}/${themeLabel.toLowerCase()}-${productIndex}-1.jpg`,
    `https://cdn.example.com/products/${handle}/${themeLabel.toLowerCase()}-${productIndex}-2.jpg`,
  ],
})