

# Buildkite CLI maintainer command

The `bk maintainer` command allows you to manage cluster maintainers from the command line.

## Commands

| Command | Description |
| --- | --- |
| `bk maintainer list` | List cluster maintainers. |
| `bk maintainer create` | Create a cluster maintainer. |
| `bk maintainer delete` | Delete a cluster maintainer. |

## List maintainers

List cluster maintainers.

```bash
bk maintainer list <cluster-uuid> [flags]
```

### Arguments

| Argument | Description |
| --- | --- |
| `<cluster-uuid>` | Cluster UUID to list maintainers for |

### Flags

| Flag | Description |
| --- | --- |
| `-o`, `--output=""` | Output format. One of: json, yaml, text |
| `--debug` | Enable debug output for REST API calls |
| `--json` | Output as JSON |
| `--text` | Output as text |
| `--yaml` | Output as YAML |

### Examples

List all maintainers for a cluster:

```bash
bk maintainer list my-cluster-uuid
```

List in JSON format:

```bash
bk maintainer list my-cluster-uuid -o json
```

## Create a maintainer

Create a cluster maintainer.

```bash
bk maintainer create <cluster-uuid> [flags]
```

### Arguments

| Argument | Description |
| --- | --- |
| `<cluster-uuid>` | Cluster UUID to add maintainer to |

### Flags

| Flag | Description |
| --- | --- |
| `-o`, `--output=""` | Output format. One of: json, yaml, text |
| `--debug` | Enable debug output for REST API calls |
| `--json` | Output as JSON |
| `--team=STRING` | Team UUID to add as maintainer |
| `--text` | Output as text |
| `--user=STRING` | User UUID to add as maintainer |
| `--yaml` | Output as YAML |

### Examples

Create a user maintainer assignment:

```bash
bk maintainer create my-cluster-uuid --user user-uuid
```

Create a team maintainer assignment:

```bash
bk maintainer create my-cluster-uuid --team team-uuid
```

## Delete maintainer

Delete a cluster maintainer.

```bash
bk maintainer delete <cluster-uuid> <maintainer-id>
```

### Arguments

| Argument | Description |
| --- | --- |
| `<cluster-uuid>` | Cluster UUID |
| `<maintainer-id>` | Maintainer assignment ID to delete |

### Flags

| Flag | Description |
| --- | --- |
| `--debug` | Enable debug output for REST API calls |

### Examples

Delete a maintainer assignment (with confirmation prompt):

```bash
bk maintainer delete my-cluster-uuid maintainer-id
```

Delete without confirmation:

```bash
bk maintainer delete my-cluster-uuid maintainer-id --yes
```

Use list to find maintainer assignment IDs:

```bash
bk maintainer list my-cluster-uuid
```

