user Command - Medusa CLI Reference

Create a new admin user.

Using RBAC? If the role-based access control (RBAC) Module is installed, the created user is assigned the Super Admin role by default, giving them full access to all resources and operations.When you pass the --invite option, the invite carries the Super Admin role, and the user receives it when they accept the invite.

Options#

Option

Description

Required

Default

-e <email>, --email <email>

The user's email.

Yes

-

-p <password>, --password <password>

The user's password.

No

-

-i <id>, --id <id>

The user's ID.

No

An automatically generated ID is used.

--invite

Whether to create a user invite instead of directly creating a user. Learn more in the Create User Invite section.

No

false


Create User Invite with Medusa CLI#

The user command accepts the --invite option to create a user invite. The user must accept the invite before they can log into the Medusa Admin.

For example:

The command will create a user invite and output the invite token. You can then either:

  • Accept the invite in the Medusa Admin at the path /app/invite?token=<invite_token>
  • Accept the invite using the Accept Invite API route.
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
⇧↵