18 skills · 52 min
Medusa Cloud
Skill 5 of 18
Execute mcloud environments commands to list, get, create, delete, redeploy, or trigger builds for Cloud environments.
1 minute · 256 words · 11 sections
Install
npx skills add medusajs/medusa-agent-skills --skill mcloud-environmentsnpx skills add medusajs/medusa-agent-skills/plugin marketplace add medusajs/medusa-agent-skillsThe first command installs just this skill, by the name in its SKILL.md; the second installs the whole repository.
Execute mcloud environments commands to manage environment lifecycle and deployments.
type via environments get --json before attempting delete in automation.--yes for destructive operations (delete) in non-interactive contexts.redeploy vs trigger-build are not interchangeable — choose the right one based on where the fix is.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 JSONRetrieve a single environment by its ID or handle.
mcloud environments get <environment-id-or-handle> --organization <org-id> --project <project-id-or-handle> --jsonArguments:
environment — Environment ID or handle (required)Options:
-o/--organization <id>, -p/--project <id-or-handle>, --jsonCreate 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 JSONDelete an environment. Cannot delete production environments.
mcloud environments delete <environment-id-or-handle> \
--organization <org-id> \
--project <project-id-or-handle> \
--yesArguments:
environment — Environment ID or handle (required)Options:
-o/--organization <id>, -p/--project <id-or-handle>-y/--yes — Skip confirmation prompt (required in non-interactive mode)--json — Output as JSONRe-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-id-or-handle> \
--organization <org-id> \
--project <project-id-or-handle> \
--jsonArguments:
environment — Environment ID or handle (required)Options:
-o/--organization <id>, -p/--project <id-or-handle>, --jsonRequires the environment to have an active deployment. If it doesn’t, use
trigger-buildfirst.
Start a new build from the tracked branch. Use when the fix is committed code — creates a new deployment.
mcloud environments trigger-build <environment-id-or-handle> \
--organization <org-id> \
--project <project-id-or-handle> \
--jsonArguments:
environment — Environment ID or handle (required)Options:
-o/--organization <id>, -p/--project <id-or-handle>, --json| 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 |
# 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
Execute mcloud environments commands to list, get, create, delete, redeploy, or trigger builds for Cloud environments. Use when managing environment lifecycle, redeploying after variable changes, or starting new builds from source.
The verbatim description from this skill’s front matter — the string an agent matches on to decide whether to load it.
Bash(mcloud environments*)Bash(mcloud use*)Bash(jq*)plugins/medusa-cloud/skills/mcloud-environments/SKILL.mdmain, last pushed 22 September 2026.SKILL.md, not by matching a directory convention. 4 distinct layouts observed: plugins/ecommerce-storefront/skills/*/SKILL.md, plugins/learn-medusa/skills/*/SKILL.md, plugins/medusa-cloud/skills/*/SKILL.md, plugins/medusa-dev/skills/*/SKILL.md.h1 and no skipped levels:.claude-plugin/marketplace.json by Medusa, declaring 4 plugins. It is read for editorial metadata only — never as the skill index, which is always the repository tree./medusajs/medusa-agent-skills.md, and each skill at its own .md URL.