$npx -y skills add medusajs/medusa-agent-skills --skill mcloud-projectsExecute mcloud projects commands to list, get, or delete Cloud projects. Use when discovering projects, resolving project handles by name, or retrieving project details including linked environments.
| 1 | # Cloud CLI: Projects Commands |
| 2 | |
| 3 | Execute `mcloud projects` commands to manage Cloud projects. |
| 4 | |
| 5 | ## Constraints |
| 6 | |
| 7 | - `projects delete` is **irreversible** — removes all associated environments, deployments, and resources. Always confirm the project ID/handle before deleting. |
| 8 | - Use `--yes` with `delete` in non-interactive contexts (scripts, pipelines, agents). |
| 9 | |
| 10 | ## Commands |
| 11 | |
| 12 | ### projects list |
| 13 | |
| 14 | List projects in an organization. If `--organization` is omitted (and no active context org is set), lists projects across all organizations you have access to, grouped by organization. |
| 15 | |
| 16 | ```bash |
| 17 | mcloud projects list --organization <org-id> --json |
| 18 | ``` |
| 19 | |
| 20 | **Options:** |
| 21 | - `-o/--organization <id>` — Organization ID (falls back to active context; if unset, lists across all your organizations) |
| 22 | - `--json` — Output as JSON |
| 23 | |
| 24 | ### projects get |
| 25 | |
| 26 | Retrieve a single project by its ID or handle. |
| 27 | |
| 28 | ```bash |
| 29 | mcloud projects get <project-id-or-handle> --organization <org-id> --json |
| 30 | ``` |
| 31 | |
| 32 | **Arguments:** |
| 33 | - `project` — Project ID or handle (required) |
| 34 | |
| 35 | **Options:** |
| 36 | - `-o/--organization <id>` — Organization ID (falls back to active context; **required**) |
| 37 | - `--json` — Output as JSON |
| 38 | |
| 39 | ### projects delete |
| 40 | |
| 41 | Delete a project by its ID or handle. **Irreversible.** |
| 42 | |
| 43 | ```bash |
| 44 | mcloud projects delete <project-id-or-handle> \ |
| 45 | --organization <org-id> \ |
| 46 | --yes |
| 47 | ``` |
| 48 | |
| 49 | **Arguments:** |
| 50 | - `project` — Project ID or handle (required) |
| 51 | |
| 52 | **Options:** |
| 53 | - `-o/--organization <id>` — Organization ID (falls back to active context; **required**) |
| 54 | - `-y/--yes` — Skip confirmation prompt (required in non-interactive mode) |
| 55 | - `--json` — Output as JSON |
| 56 | |
| 57 | ## Project Fields (JSON) |
| 58 | |
| 59 | | Field | Description | |
| 60 | |-------|-------------| |
| 61 | | `id` | Project ID | |
| 62 | | `handle` | URL-safe project handle (used in most commands) | |
| 63 | | `name` | Display name | |
| 64 | | `status` | `ready` when healthy | |
| 65 | | `region` | Deployment region (e.g. `us-east-1`) | |
| 66 | | `repository` | Linked GitHub repository (`owner/repo`) | |
| 67 | | `root_path` | Root path within the repository | |
| 68 | | `organization` | Owning organization (`id`, `name`, `created_at`) | |
| 69 | | `environments` | Array of associated environments (each may include `storefront_environments`) | |
| 70 | |
| 71 | ## Examples |
| 72 | |
| 73 | ```bash |
| 74 | # List all projects in an organization |
| 75 | mcloud projects list --organization org_123 --json |
| 76 | |
| 77 | # Set context to a project by name |
| 78 | PROJECT_HANDLE=$( |
| 79 | mcloud projects list --organization org_123 --json \ |
| 80 | | jq -r '.[] | select(.name == "My Store") | .handle' |
| 81 | ) |
| 82 | mcloud use --project "$PROJECT_HANDLE" |
| 83 | |
| 84 | # Get project details including environments |
| 85 | mcloud projects get my-store --organization org_123 --json |
| 86 | |
| 87 | # List all environment handles for a project |
| 88 | mcloud projects get my-store --organization org_123 --json \ |
| 89 | | jq -r '.environments[].handle' |
| 90 | |
| 91 | # Find project handle by name |
| 92 | mcloud projects list --organization org_123 --json \ |
| 93 | | jq -r '.[] | select(.name == "My Store") | .handle' |
| 94 | |
| 95 | # Delete a project (irreversible — confirm before running) |
| 96 | mcloud projects delete old-project --organization org_123 --yes |
| 97 | ``` |