new Command - Medusa CLI Reference

Create a new Medusa application. Unlike the create-medusa-app CLI tool, this command provides more flexibility for experienced Medusa developers in creating and configuring their project. It creates a monorepo structure with your Medusa backend in the apps/backend directory.

Terminal
❯medusa new [<dir_name>]

Arguments#

Argument

Description

Required

Default

dir_name

The name of the directory to create the Medusa application in. If not provided, you'll be prompted to enter a project name.

No

-

Options#

Option

Description

-y, --useDefaults

Skip all prompts, such as database prompts. A database might not be created if default PostgreSQL credentials don't work.

--skip-db

Skip database creation.

--skip-env

Skip populating .env.

--db-user <user>

The database user to use for database setup.

--db-database <database>

The name of the database used for database setup.

--db-pass <password>

The database password to use for database setup.

--db-port <port>

The database port to use for database setup.

--db-host <host>

The database host to use for database setup.

--skip-migrations

Skip running migrations and seeding.

--branch <branch>

The branch to clone from the starter repository.

Example#

Terminal
❯medusa new my-medusa-store

After running the command, navigate to your project directory and start the development server:

Was this page helpful?
Ask Bloom
For assistance in your development, use Claude Code Plugins or Docs MCP server in Cursor, VSCode, etc...FAQ
What is Medusa?
How can I create a module?
How can I create a data model?
How do I create a workflow?
How can I extend a data model in the Product Module?
Recipes
How do I build a marketplace with Medusa?
How do I build digital products with Medusa?
How do I build subscription-based purchases with Medusa?
What other recipes are available in the Medusa documentation?
Chat is cleared on refresh
Line break
⇧↵