Skip to content
Development
Skill

/mcloud-environments

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.

From plugin
medusa-agent-skills
23418 skills1 MCP

Claude Code

$ npx -y skills add medusajs/medusa-agent-skills --skill mcloud-environments --agent claude-code

SKILL.md

mcloud-environments.SKILL.md
name: mcloud-environments
description: 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.
allowed-tools: Bash(mcloud environments*), Bash(mcloud use*), Bash(jq*)

Cloud CLI: Environments Commands

Execute `mcloud environments` commands to manage environment lifecycle and deployments.

Constraints

  • **Production environments cannot be deleted.** Always check `type` via `environments get --json` before attempting delete in automation.
  • Use `--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.

Commands

environments list

List all environments in a project.

mcloud environments list --organization <org-id> --project <project-id-or-handle> --json

**Options:**

  • `-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 its ID or handle.

mcloud environments get <environment-id-or-handle> --organization <org-id> --project <project-id-or-handle> --json

**Arguments:**

  • `environment` — Environment ID or 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 \
  --json

**Options:**

  • `-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-id-or-handle> \
  --organization <org-id> \
  --project <project-id-or-handle> \
  --yes

**Arguments:**

  • `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 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-id-or-handle> \
  --organization <org-id> \
  --project <project-id-or-handle> \
  --json

**Arguments:**

  • `environment` — Environment ID or 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-id-or-handle> \
  --organization <org-id> \
  --project <project-id-or-handle> \
  --json

**Arguments:**

  • `environment` — Environment ID or 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}'
Read more
@medusajs
Ships withmedusa-agent-skills

A collection of skills composed as Claude Code plugins for building Medusa applications with best practices and architectural patterns. These skills can be used with any agent, as explained in the Usage with Other Agents section.

23418 skills1 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
234
Star history of medusajs/medusa-agent-skills on GitHub, a chart by star-history.com

Other skills on medusa-agent-skills.

mcloud-auth

mcloud-auth

Execute mcloud authentication and context commands: login, logout, whoami, use, version, and signup. Use when setting up the CLI,…

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills13d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc2w293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react4d252k
@facebook@facebookInstall Skill

Questions about mcloud-environments.

Which coding agents can use mcloud-environments?
mcloud-environments installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.