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. If you don't specify an organization, either through the --organization flag or the active context, the command lists projects across all organizations you have access to, grouped by organization.
Options#
Option | Description | Required | Default |
|---|---|---|---|
| The ID of the organization to list projects from. If omitted, projects across all your organizations are listed. | No | Falls back to the organization in the active context, if set. Otherwise, lists projects across all your organizations. |
| 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 | Default |
|---|---|---|---|
| The ID, handle, or name of the project to retrieve. | No | Falls back to the project in the active context, if set. |
Options#
Option | Description | Required | Default |
|---|---|---|---|
| The ID, handle, or name of the project to retrieve. Interchangeable with the positional argument. | No | Falls back to the project in the active context, if set. |
| 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 | Default |
|---|---|---|---|
| The ID, handle, or name of the project to delete. | No | Falls back to the project in the active context, if set. |
Options#
Option | Description | Required | Default |
|---|---|---|---|
| The ID, handle, or name of the project to delete. Interchangeable with the positional argument. | No | Falls back to the project in the active context, if set. |
| 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: