projects Command - Medusa Cloud CLI Reference
In this guide, you'll learn how to manage your Cloud projects using the CLI.
projects list#
List all projects in an organization.
Options#
Option | Description | Required | Default |
|---|---|---|---|
| The ID of the organization to list projects from. | Yes | Falls back to the organization in the active context, if set. |
| Print the result as JSON instead of formatted text. | No |
|
projects get#
Retrieve a single project by its ID or handle. This is useful if you want to get more details about the project, such as its status or region.
Returns the following information:
Arguments#
Option | Description | Required |
|---|---|---|
| The ID or handle of the project to retrieve. | Yes |
Options#
Option | Description | Required | Default |
|---|---|---|---|
| The ID of the organization to get the project from. | Yes | Falls back to the organization in the active context, if set. |
| Print the result as JSON instead of formatted text. | No |
|
projects delete#
Delete a project by its ID or handle.
Arguments#
Option | Description | Required |
|---|---|---|
| The ID or handle of the project to delete. | Yes |
Options#
Option | Description | Required | Default |
|---|---|---|---|
| The ID of the organization to get the project from. | Yes | Falls back to the organization in the active context, if set. |
| Skip the confirmation prompt. Use this in scripts and pipelines where interactive input is not possible. | No |
|
| Print the result as JSON instead of formatted text. | No |
|
Find Project IDs and Handles#
Commands that operate on projects require a project ID or handle. You can either:
- Use the interactive selector in mcloud use to set an active project for the current context. Once set, you can omit the
--projectflag from all subsequent commands; - Or use
projects list --jsonto get machine-readable project data. Pipe the output tojqto extract IDs or handles for use in subsequent commands. This is useful if you want to set the active project through an AI agent, script, or CI/CD pipeline.
For example, to set the first project in the list as the active project:
To set a project by name as the active project:
Once set, you can omit the --project flag from all subsequent commands.
Delete a Project Without Confirmation#
In automated cleanup scripts, use --yes to skip the interactive
confirmation prompt: