Command line interface for Medusa Commerce platform with project creation, development server, and database management capabilities
—
Pending
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Pending
The risk profile of this skill
The Medusa CLI provides comprehensive development server management capabilities for running Medusa Commerce applications in development, production, and cluster modes. These commands are only available within Medusa project directories.
Starts the Medusa development server with file watching and automatic reloading for development workflows.
medusa developOptions:
-H, --host <string>: Set server host (default: localhost)-p, --port <string>: Set server port (default: 9000 or PORT environment variable)Usage Examples:
# Start development server with defaults
medusa develop
# Start on custom host and port
medusa develop --host 0.0.0.0 --port 3000
# Start with port from environment or custom
medusa develop -p 8080Behavior:
Starts the Medusa server in production mode for deployment scenarios.
medusa startOptions:
-H, --host <string>: Set server host (default: localhost)-p, --port <string>: Set server port (default: 9000 or PORT environment variable)Usage Examples:
# Start production server
medusa start
# Start on all interfaces
medusa start --host 0.0.0.0
# Start with custom port
medusa start --port 4000Behavior:
Starts the Medusa server in cluster mode for improved performance through process parallelization.
medusa start-clusterOptions:
-H, --host <string>: Set server host (default: localhost)-p, --port <string>: Set server port (default: 9000 or PORT environment variable)-c, --cpus <number>: Number of CPU cores to use (default: all available cores or CPUS environment variable)Usage Examples:
# Start cluster with all available CPUs
medusa start-cluster
# Start cluster with specific CPU count
medusa start-cluster --cpus 4
# Start cluster on custom host and port
medusa start-cluster --host 0.0.0.0 --port 8000 --cpus 2Behavior:
All server commands support flexible host and port configuration:
Host Configuration:
localhost for local development0.0.0.0 for external accessPort Configuration:
9000 unless PORT environment variable is setThe server commands respect and set these environment variables:
NODE_ENV:
PORT:
CPUS (cluster mode only):
These commands are only available when running inside a valid Medusa project:
Detection Criteria:
Error Handling:
Development server commands are proxied to the local Medusa installation:
Dynamic Loading:
@medusajs/medusa/dist/commands/[command]Argument Passing:
All server commands are designed to run indefinitely:
The development server integrates with common development workflows: