organizations Command - Medusa Cloud CLI Reference
In this guide, you'll learn how to manage your Cloud organizations using the CLI.
organizations list#
List all organizations your account has access to.
Options#
| Option | Description | Default |
|---|---|---|
| Print the result as JSON instead of formatted text. |
|
organizations get#
Retrieve a single organization by its ID. Returns the organization's metadata, subscription details, and members.
Returns the following information:
Arguments#
Option | Description | Required |
|---|---|---|
| The ID of the organization to retrieve. | Yes |
Options#
Option | Description | Required | Default |
|---|---|---|---|
| Override the organization in the active context. The argument and this flag must match. | No | Falls back to the organization in the active context, if set. |
| Print the result as JSON instead of formatted text. | No |
|
Find Organization ID#
Commands that operate on organizations require an organization ID. You can either:
- Use the interactive selector in mcloud use to set an active organization for the current context. Once set, you can omit the
--organizationflag from all subsequent commands; - Or use
organizations list --jsonto get machine-readable organization data. Pipe the output tojqto extract IDs for use in subsequent commands. This is useful if you want to set the active organization through an AI agent, script, or CI/CD pipeline.
For example, to set the first organization in the list as the active organization:
To set the active organization to the ID of an organization by its name:
Once set, you can omit the --organization flag from all subsequent commands.