
Mcloud Environments
- 671 installs
- 207 repo stars
- Updated July 31, 2026
- medusajs/medusa-agent-skills
mcloud-environments is an agent skill that runs Medusa Cloud CLI `mcloud environments` commands to list, create, delete, redeploy, and trigger builds for headless ecommerce environments when developers manage dev, stagin
About
mcloud-environments is a Medusa Cloud agent skill from medusajs/medusa-agent-skills that guides AI agents through six `mcloud environments` subcommands—list, get, create, delete, redeploy, and trigger-build—plus `mcloud use` context switching and `jq` JSON parsing. The skill enforces safety rules such as blocking production deletes, requiring `--yes` for non-interactive deletes, and choosing redeploy versus trigger-build based on whether the fix is environment-side or committed code. Developers reach for mcloud-environments when provisioning new long-lived Cloud environments, redeploying after variable or infra changes, or kicking off fresh builds from a tracked branch without memorizing CLI flags and guardrails.
- Medusa Cloud environment provisioning and configuration
- Dev, staging, and production environment separation
- Agent-guided infra workflows for mcloud
- Ecommerce deployment target management
- Environment variables and cloud topology setup
Mcloud Environments by the numbers
- 671 all-time installs (skills.sh)
- +74 installs in the week ending Aug 4, 2026 (Skillselion tracking)
- Ranked #340 of 1,039 Cloud & Infrastructure skills by installs in the Skillselion catalog
- Data as of Aug 4, 2026 (Skillselion catalog sync)
npx skills add https://github.com/medusajs/medusa-agent-skills --skill mcloud-environmentsAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 671 |
|---|---|
| repo stars | ★ 207 |
| Last updated | July 31, 2026 |
| Repository | medusajs/medusa-agent-skills ↗ |
How do you manage Medusa Cloud environment deployments?
Provision, configure, and manage Medusa Cloud environments (dev, staging, production) for headless ecommerce projects via agent-assisted workflows.
Who is it for?
Developers operating Medusa Cloud headless ecommerce projects who need agent-assisted environment provisioning, redeploys after variable changes, and branch builds without hand-rolling CLI sequences.
Skip if: Developers building Medusa backend modules, admin UI, or storefront features locally who do not use Medusa Cloud or the mcloud CLI.
When should I use this skill?
A developer asks to list, create, delete, redeploy, or trigger-build Medusa Cloud environments, switch project context with mcloud use, or redeploy after environment variable or source-code changes.
What you get
Listed environment handles, JSON environment details, newly created long-lived environments, redeployed active deployments, and branch-triggered build deployments.
- Provisioned or deleted Cloud environment records
- Redeployed active deployment on an environment
- New build deployment triggered from a tracked branch
By the numbers
- Covers 6 mcloud environments subcommands: list, get, create, delete, redeploy, and trigger-build
- Restricts agent execution to 3 allowed Bash tool patterns: mcloud environments*, mcloud use*, and jq*
- Documents two distinct deployment recovery paths: redeploy for environment-side fixes and trigger-build for source-code
Files
Cloud CLI: Environments Commands
Execute mcloud environments commands to manage environment lifecycle and deployments.
Constraints
- Production environments cannot be deleted. Always check
typeviaenvironments get --jsonbefore attempting delete in automation. - Use
--yesfor destructive operations (delete) in non-interactive contexts. redeployvstrigger-buildare not interchangeable — choose the right one based on where the fix is.
Commands
environments list
List all environments in a project.
mcloud environments list --organization <org-id> --project <project-id-or-handle> --jsonOptions:
-o/--organization <id>— Organization ID (falls back to active context)-p/--project <id-or-handle>— Project ID or handle (falls back to active context)--json— Output as JSON
environments get
Retrieve a single environment by handle.
mcloud environments get <environment-handle> --organization <org-id> --project <project-id-or-handle> --jsonArguments:
environment— Environment handle (required)
Options:
-o/--organization <id>,-p/--project <id-or-handle>,--json
environments create
Create a new long-lived environment.
mcloud environments create \
--organization <org-id> \
--project <project-id-or-handle> \
--name "Staging" \
--branch develop \
--jsonOptions:
-o/--organization <id>,-p/--project <id-or-handle>-n/--name <name>— Environment name (required)-b/--branch <branch>— Git branch to track (required)--custom-subdomain <subdomain>— Optional custom subdomain--json— Output as JSON
environments delete
Delete an environment. Cannot delete production environments.
mcloud environments delete <environment-handle> \
--organization <org-id> \
--project <project-id-or-handle> \
--yesArguments:
environment— Environment handle (required)
Options:
-o/--organization <id>,-p/--project <id-or-handle>-y/--yes— Skip confirmation prompt (required in non-interactive mode)--json— Output as JSON
environments redeploy
Re-run an existing build for the active deployment. Use when the fix is environment-side (variable change, infra issue) — does NOT start a new build.
mcloud environments redeploy <environment-handle> \
--organization <org-id> \
--project <project-id-or-handle> \
--jsonArguments:
environment— Environment handle (required)
Options:
-o/--organization <id>,-p/--project <id-or-handle>,--json
Requires the environment to have an active deployment. If it doesn't, use trigger-build first.environments trigger-build
Start a new build from the tracked branch. Use when the fix is committed code — creates a new deployment.
mcloud environments trigger-build <environment-handle> \
--organization <org-id> \
--project <project-id-or-handle> \
--jsonArguments:
environment— Environment handle (required)
Options:
-o/--organization <id>,-p/--project <id-or-handle>,--json
Redeploy vs Trigger-Build Decision
| Command | When to use |
|---|---|
redeploy | Fix is environment-side (variable change, infra config) — reruns existing build |
trigger-build | Fix is in source code on the tracked branch — starts a new build |
Examples
# List all environments
mcloud environments list --json
# Get environment details and check type before deleting
mcloud environments get staging --json | jq '{id, name, type, status}'
# Create a new environment tracking the develop branch
mcloud environments create --name "Staging" --branch develop --json
# Delete a non-production environment
mcloud environments delete staging --yes
# Redeploy after a variable change
mcloud environments redeploy production --json
# Trigger a fresh build from source
mcloud environments trigger-build production --json
# Find environment handles by name
mcloud environments list --json \
| jq -r '.[] | select(.name == "Production") | .handle'
# Verify new build started
mcloud deployments list --environment production --limit 5 --json \
| jq '.[] | {id, backend_status, updated_at}'Related skills
How it compares
Pick mcloud-environments over general Medusa development skills when the task is Cloud CLI environment lifecycle and deployment operations rather than local backend, admin, or storefront code changes.
FAQ
What is the difference between mcloud redeploy and trigger-build?
mcloud-environments uses redeploy to rerun an existing build when the fix is environment-side—variable or infra changes—while trigger-build starts a new build from the tracked branch when committed source code changed. Redeploy requires an active deployment already on the environ
Can mcloud-environments delete a production Medusa Cloud environment?
mcloud-environments blocks production deletes by design. The skill requires checking environment type with `mcloud environments get --json` before any automated delete, and production environments cannot be removed through these workflows.
Which CLI tools does mcloud-environments allow agents to run?
mcloud-environments restricts agents to Bash for `mcloud environments*`, `mcloud use*` for project context switching, and `jq*` for parsing `--json` output from list, get, create, delete, redeploy, and trigger-build commands.