Blog

July 26, 2026·Product

Medusa Cloud CLI v0.1.11: local builds, variable management, and named context

Pedro Hernández

Pedro avatar

Pedro Hernández

The Medusa Cloud CLI (mcloud) adds three new capabilities: local builds, expanded variable management, and the ability to pass context flags by name.

Image modal

Last week we released a new version of Medusa Cloud CLI (mcloud), v0.1.11. It adds three new capabilities:

  1. Run builds of your Medusa Cloud project locally
  2. Manage environment variables from the CLI
  3. Support names when setting project and environment contexts.

Keep reading to learn more about these new features. Check out the full changelog in the documentation.

Run Cloud builds locally

Copy to clipboardmcloud local build reproduces your Cloud build environment on your machine. It requires Docker to be installed and running. Run the command from the root of the repository you want to build.

The simplest usage builds the backend using settings inferred from your linked Cloud project:

mcloud local build

To build the storefront instead, pass Copy to clipboard-t storefront:

mcloud local build -t storefront

Cloud environment variables are pulled in automatically. You can override them by passing a local env file or individual values:

mcloud local build --env-file .env
mcloud local build -v NODE_ENV=production -v API_URL=http://localhost:9000

If you want to test a build for a repository that isn't deployed on Cloud yet, pass the path explicitly with Copy to clipboard--root-path:

mcloud local build --root-path ./my-new-backend

Expanded variable management

Variable management now includes four commands: Copy to clipboardlist, Copy to clipboardget, Copy to clipboardset, and Copy to clipboarddelete. Previously, only Copy to clipboardget and Copy to clipboardlist were available.

  • Copy to clipboardvariables set creates or updates environment variables. It accepts single assignments, batch operations via multiple Copy to clipboard--var flags, or Copy to clipboard.env file imports
  • Copy to clipboardvariables delete removes a variable by ID or key; the operation is irreversible and requires confirmation unless Copy to clipboard--yes is passed
mcloud variables set API_KEY pk_123

The Copy to clipboardvariables list command now also supports Copy to clipboard--reveal to display masked secret values in plaintext, Copy to clipboard--dotenv to output in Copy to clipboard.env format, and Copy to clipboard--include-system to include auto-injected Medusa Cloud variables.

Changes to variables don't auto-deploy. Run Copy to clipboardmcloud environments trigger-build after updating or deleting variables to apply the changes.

mcloud environments trigger-build Production

Reference context by name

Organization, project, and environment flags now accept names in addition to IDs/handles. Instead of:

mcloud local build --organization org_12345abc --project m12345 --environment e12345

You can pass the names directly:

mcloud local build --organization "John's projects" --project Bookstore --environment Production

This works across all commands that accept Copy to clipboard--organization, Copy to clipboard--project, and Copy to clipboard--environment flags, including Copy to clipboardmcloud use to set the context for future commands:

mcloud use --organization "John's projects" --project Bookstore --environment Production

Get started

Update to Copy to clipboardmcloud v0.1.10 or later to access the new features:

npm install @medusajs/mcloud -g

See the local build reference and variables reference in the docs to learn more about these commands.

Share this post

Ready to build your custom commerce setup?