Command Palette

Search for a command to run...

create-medusa-plugin

A CLI tool to quickly scaffold a Medusa plugin and example projects in a ready-to-develop monorepo structure.

Usage

uses the official under the hood to scaffold Medusa projects—including the plugin, backend and storefront folders. This ensures your setup follows official best practices and remains fully compatible with the Medusa ecosystem by leveraging the official Medusa app generator.

npx create-medusa-plugin [plugin-name] [options]

Replace with your desired plugin name.

Options

OptionDescriptionDefault
Root repository (monorepo) namenone
Example folder name, where the and examples will be creatednone
Path to the output directory for the root repositoryCurrent directory
URL of repository to setup a Medusa plugin (forwards to )none
URL of repository to setup an example Medusa backend (forwards to )none
Do not include example storefront (forwards as to )
Skip creating the Medusa example database (forwards to )
Show all logs of underlying commands (forwards to )

Examples

  • Basic usage

    npx create-medusa-plugin

    This command will prompt you for the plugin name and other configuration options interactively.

  • With options

    npx create-medusa-plugin my-plugin -r my-plugin-monorepo -e my-plugin-example --skip-example-db

    This command scaffolds the following monorepo structur, installing the Medusa projects within it:

  • With a plugin scope

    npx create-medusa-plugin @my-scope/my-plugin -r my-plugin-monorepo -e my-plugin-example --skip-example-db

    This command scaffolds the following monorepo structure, placing your scoped plugin in a nested folder under and installing the Medusa projects within it: