> ## Documentation Index
> Fetch the complete documentation index at: https://docs.idyl.network/llms.txt
> Use this file to discover all available pages before exploring further.

# idyl org

> Manage organizations

View and manage organizations.

Organizations are the top-level grouping for accounts, providing centralized
management of billing, policies, and access control.

## Usage

```bash theme={null}
idyl org
```

## Aliases

* `orgs`
* `organization`
* `organizations`

## Commands

| Command           | Description                                        |
| ----------------- | -------------------------------------------------- |
| `idyl org create` | Create a new organization                          |
| `idyl org delete` | Delete an organization                             |
| `idyl org edit`   | Edit an organization                               |
| `idyl org get`    | Get organization details or list all organizations |
| `idyl org invite` | Manage organization invitations                    |
| `idyl org leave`  | Leave the current organization                     |
| `idyl org ou`     | Manage organizational units                        |

## Inherited flags

| Flag                                 | Description                                                        |
| ------------------------------------ | ------------------------------------------------------------------ |
| `-a <string>, --account-id <string>` | Account ID to use, overriding the current context.                 |
| `-c <string>, --context <string>`    | Use the named context for this command.                            |
| `--homedir <string>`                 | Override the configuration directory. Defaults to \~/.config/idyl. |
| `-n <string>, --namespace <string>`  | Namespace to use for this command.                                 |
| `-o <string>, --output <string>`     | Output format (json\|yaml).                                        |
| `-p <string>, --profile <string>`    | Override the access profile for this command.                      |
| `--realm <string>`                   | Override the realm for this command.                               |
| `--subnet <string>`                  | Override the context subnet for this command.                      |

## Examples

```bash theme={null}
# List organizations you can access
idyl org list

# Get details of a specific organization (by ID)
idyl org get <org-id>

# Create a new organization
idyl org create --name "My Org" --billing-email billing@example.com

# Edit an organization
idyl org edit <org-id> --set-name "My Organization"

# Delete an organization
idyl org delete <org-id>
```

## Subcommand reference

### `idyl org create`

Create a new organization.

The organization name is a display label, not a persistent identifier.
After creation, use the returned ID for all subsequent operations.

#### Usage

```bash theme={null}
idyl org create [flags]
```

#### Flags

| Flag                             | Description                                            |
| -------------------------------- | ------------------------------------------------------ |
| `--billing-email <string>`       | Billing email address for the organization.            |
| `--name <string>`                | Required. Organization name.                           |
| `-o <string>, --output <string>` | Output format: table, json, or yaml. Default: `table`. |

#### Examples

```bash theme={null}
# Create an organization
idyl org create --name "My Company"

# Create an organization with billing email
idyl org create --name "My Company" --billing-email billing@example.com
```

### `idyl org delete`

Delete an organization by ID.

This action is irreversible and will remove the organization and all associated
resources. Requires admin access to the organization.

You will be prompted for confirmation unless the --yes flag is provided.

#### Usage

```bash theme={null}
idyl org delete <id> [flags]
```

#### Flags

| Flag        | Description                |
| ----------- | -------------------------- |
| `-y, --yes` | Skip confirmation prompts. |

#### Examples

```bash theme={null}
# Delete an organization (with confirmation)
idyl org delete <org-id>

# Delete without confirmation
idyl org delete <org-id> --yes
```

### `idyl org edit`

Edit an organization's settings.

Only the specified flags are updated; other settings remain unchanged.
Requires admin access to the organization.

#### Usage

```bash theme={null}
idyl org edit <id> [flags]
```

#### Flags

| Flag                             | Description                                            |
| -------------------------------- | ------------------------------------------------------ |
| `-o <string>, --output <string>` | Output format: table, json, or yaml. Default: `table`. |
| `--set-billing-email <string>`   | Set the organization billing email.                    |
| `--set-name <string>`            | Set the organization display name.                     |

#### Examples

```bash theme={null}
# Update display name
idyl org edit <org-id> --set-name "My Company Inc."

# Update billing email
idyl org edit <org-id> --set-billing-email finance@example.com

# Update both
idyl org edit <org-id> --set-name "My Company Inc." --set-billing-email finance@example.com
```

### `idyl org get`

Get details of a specific organization, or list all organizations you can access.

With no arguments, lists all accessible organizations.
With an ID argument, gets details of that specific organization.

#### Usage

```bash theme={null}
idyl org get [id] [flags]
```

#### Aliases

* `list`
* `ls`

#### Flags

| Flag                             | Description                                             |
| -------------------------------- | ------------------------------------------------------- |
| `--limit <int>`                  | Maximum number of organizations to list. Default: `20`. |
| `--offset <int>`                 | Number of organizations to skip. Default: `0`.          |
| `-o <string>, --output <string>` | Output format: table, json, or yaml. Default: `table`.  |

#### Examples

```bash theme={null}
# List organizations you can access
idyl org get

# Get organization by ID
idyl org get <org-id>

# Get organization in JSON format
idyl org get <org-id> -o json
```

### `idyl org invite`

View and manage invitations to join organizations.

This command supports both organization-scoped operations (for admins)
and account-scoped operations (for users receiving invitations).

Organization-scoped commands (require org context):

* get: Get invitation details or list all pending invitations
* send: Send a new invitation to join the organization

Account-scoped commands (for the current user):

* accept: Accept a pending invitation
* decline: Decline a pending invitation

#### Usage

```bash theme={null}
idyl org invite
```

#### Aliases

* `invites`
* `invitation`
* `invitations`

#### Commands

| Command                   | Description                                    |
| ------------------------- | ---------------------------------------------- |
| `idyl org invite accept`  | Accept an invitation to join an organization   |
| `idyl org invite decline` | Decline an invitation to join an organization  |
| `idyl org invite get`     | Get invitation details or list all invitations |
| `idyl org invite send`    | Send an invitation to join the organization    |

#### Examples

```bash theme={null}
# List invitations sent by the organization (admin)
idyl org invite list

# Get a specific invitation
idyl org invite get <invitation-id>

# Send an invitation to a user
idyl org invite send user@example.com

# Accept an invitation
idyl org invite accept <invitation-id>

# Decline an invitation
idyl org invite decline <invitation-id>
```

### `idyl org invite accept`

Accept a pending invitation to join an organization.

After accepting, you will become a member of the organization and can
switch to that account context using 'idyl use'.

#### Usage

```bash theme={null}
idyl org invite accept <id>
```

#### Examples

```bash theme={null}
# Accept an invitation
idyl org invite accept <invitation-id>
```

### `idyl org invite decline`

Decline a pending invitation to join an organization.

Once declined, the invitation cannot be accepted. The organization
administrator may send a new invitation if needed.

#### Usage

```bash theme={null}
idyl org invite decline <id>
```

#### Examples

```bash theme={null}
# Decline an invitation
idyl org invite decline <invitation-id>
```

### `idyl org invite get`

Get details of a specific invitation, or list all invitations.

With no arguments, lists all invitations sent by the current organization.
With an ID argument, gets details of that specific invitation.

#### Usage

```bash theme={null}
idyl org invite get [id] [flags]
```

#### Aliases

* `list`
* `ls`

#### Flags

| Flag                             | Description                                            |
| -------------------------------- | ------------------------------------------------------ |
| `-o <string>, --output <string>` | Output format: table, json, or yaml. Default: `table`. |

#### Examples

```bash theme={null}
# List all invitations
idyl org invite get

# Get a specific invitation
idyl org invite get <invitation-id>

# List invitations in JSON format
idyl org invite get -o json
```

### `idyl org invite send`

Send an invitation to a user to join the current organization.

This command requires an organization context. The invitee will receive
an invitation that they can accept or decline.

#### Usage

```bash theme={null}
idyl org invite send <email> [flags]
```

#### Flags

| Flag               | Description                                    |
| ------------------ | ---------------------------------------------- |
| `--ou-id <string>` | Target organizational unit ID for the invitee. |

#### Examples

```bash theme={null}
# Send an invitation
idyl org invite send user@example.com

# Send an invitation to a specific OU
idyl org invite send user@example.com --ou-id <ou-id>
```

### `idyl org leave`

Leave the organization that the current account belongs to.

This action removes your account from the organization. You will lose
access to organization resources and will need a new invitation to rejoin.

This command requires confirmation unless --yes is specified.

#### Usage

```bash theme={null}
idyl org leave [flags]
```

#### Flags

| Flag        | Description                |
| ----------- | -------------------------- |
| `-y, --yes` | Skip confirmation prompts. |

#### Examples

```bash theme={null}
# Leave the current organization (with confirmation)
idyl org leave

# Leave without confirmation
idyl org leave --yes
```

### `idyl org ou`

View and manage organizational units (OUs) within your organization.

Organizational units provide a hierarchical structure for organizing accounts
within an organization. OUs can contain other OUs and accounts.

This command requires an organization context. If your current account is not
part of an organization, these commands will not work.

#### Usage

```bash theme={null}
idyl org ou
```

#### Aliases

* `ous`

#### Commands

| Command              | Description                                     |
| -------------------- | ----------------------------------------------- |
| `idyl org ou create` | Create a new organizational unit                |
| `idyl org ou delete` | Delete an organizational unit                   |
| `idyl org ou edit`   | Edit an organizational unit                     |
| `idyl org ou get`    | Get organizational unit details or list all OUs |
| `idyl org ou move`   | Move an organizational unit to a new parent     |

#### Examples

```bash theme={null}
# List all OUs in the current organization
idyl org ou list

# Create a new OU
idyl org ou create --name engineering --description "Engineering team"

# Get details of an OU by ID
idyl org ou get <ou-id>

# Edit an OU
idyl org ou edit <ou-id> --set-name "Platform Engineering"

# Move an OU to a new parent
idyl org ou move <ou-id> --set-parent-id <parent-ou-id>

# Delete an OU
idyl org ou delete <ou-id>
```

### `idyl org ou create`

Create a new organizational unit in the current organization.

The OU name is a display label. You can optionally specify a description
and a parent OU ID.

#### Usage

```bash theme={null}
idyl org ou create [flags]
```

#### Flags

| Flag                             | Description                                            |
| -------------------------------- | ------------------------------------------------------ |
| `--description <string>`         | Description of the organizational unit.                |
| `--name <string>`                | Required. Organizational unit name.                    |
| `-o <string>, --output <string>` | Output format: table, json, or yaml. Default: `table`. |
| `--parent-id <string>`           | Parent OU ID when creating a nested OU.                |

#### Examples

```bash theme={null}
# Create a top-level OU
idyl org ou create --name engineering

# Create an OU with a description
idyl org ou create --name engineering --description "Engineering department"

# Create a nested OU under an existing parent (by ID)
idyl org ou create --name platform --parent-id <parent-ou-id>
```

### `idyl org ou delete`

Delete an organizational unit by ID.

This action is irreversible and will remove the OU. The OU must be empty
(no child OUs or accounts) before it can be deleted.

You will be prompted for confirmation unless the --yes flag is provided.

#### Usage

```bash theme={null}
idyl org ou delete <id> [flags]
```

#### Flags

| Flag        | Description                |
| ----------- | -------------------------- |
| `-y, --yes` | Skip confirmation prompts. |

#### Examples

```bash theme={null}
# Delete an OU (with confirmation)
idyl org ou delete <ou-id>

# Delete without confirmation
idyl org ou delete <ou-id> --yes
```

### `idyl org ou edit`

Edit an organizational unit's settings.

Only the specified flags are updated; other settings remain unchanged.

#### Usage

```bash theme={null}
idyl org ou edit <id> [flags]
```

#### Flags

| Flag                             | Description                                            |
| -------------------------------- | ------------------------------------------------------ |
| `-o <string>, --output <string>` | Output format: table, json, or yaml. Default: `table`. |
| `--set-description <string>`     | Set the OU description.                                |
| `--set-name <string>`            | Set the OU display name.                               |

#### Examples

```bash theme={null}
# Update an OU's display name
idyl org ou edit <ou-id> --set-name "Platform Engineering"

# Update an OU's description
idyl org ou edit <ou-id> --set-description "Platform team"

# Update both
idyl org ou edit <ou-id> --set-name "Platform" --set-description "Platform team"
```

### `idyl org ou get`

Get details of a specific organizational unit, or list all OUs.

With no arguments, lists all organizational units in the current organization.
With an ID argument, gets details of that specific OU.

#### Usage

```bash theme={null}
idyl org ou get [id] [flags]
```

#### Aliases

* `list`
* `ls`

#### Flags

| Flag                             | Description                                            |
| -------------------------------- | ------------------------------------------------------ |
| `-o <string>, --output <string>` | Output format: table, json, or yaml. Default: `table`. |

#### Examples

```bash theme={null}
# List all OUs
idyl org ou get

# Get an OU by ID
idyl org ou get <ou-id>

# Get OU in JSON format
idyl org ou get <ou-id> -o json
```

### `idyl org ou move`

Move an organizational unit to a new parent OU.

This changes the hierarchical position of the OU within the organization.
Use --set-parent-id to specify the new parent OU, or --to-root to move
the OU to the root level.

#### Usage

```bash theme={null}
idyl org ou move <id> [flags]
```

#### Flags

| Flag                             | Description                                            |
| -------------------------------- | ------------------------------------------------------ |
| `-o <string>, --output <string>` | Output format: table, json, or yaml. Default: `table`. |
| `--set-parent-id <string>`       | New parent OU ID.                                      |
| `--to-root`                      | Move the OU to the root level, with no parent.         |

#### Examples

```bash theme={null}
# Move an OU to a different parent
idyl org ou move <ou-id> --set-parent-id <parent-ou-id>

# Move an OU to the root level
idyl org ou move <ou-id> --to-root
```
