# teams

> Every coline teams command, with its flags and the action it runs.

Source: https://docs.coline.app/cli/reference/teams

{/* Generated by apps/docs/scripts/cli-reference.ts from coline's command tree and the cli action catalog. Don't edit it: run `pnpm --filter @colineapp/docs cli:reference`. */}

Every `coline teams` command, 12 in all.

## teams archive

Archives a team. Its drive and channel stay. Only when the person clearly asks for it.

It removes or overwrites something, so it runs only with --confirm.

```text
coline teams archive [flags]
```

**Action** `teams.archive` · **Effect** destructive, runs only with `--confirm` · **Can wait for your approval** no · **Scope** `tools.write` · **Workspace** yes, `-w`

| Flag             | What it does                                       |
| ---------------- | -------------------------------------------------- |
| `--team-id <id>` | Team id from list\_teams. Required.                |
| `--input <file>` | Read the input as JSON from a file; - reads stdin. |

```bash
coline teams archive -w acme --team-id <team-id> --confirm
coline teams archive -w acme --json '{"teamId":"<team-id>"}' --fields id --confirm
```

## teams channels add

Links a channel to a team; a default channel is joined by everyone who joins the team. A private channel can only be linked by someone in it.

```text
coline teams channels add [flags]
```

**Action** `teams.channels.add` · **Effect** write · **Can wait for your approval** no · **Scope** `tools.write` · **Workspace** yes, `-w`

| Flag                | What it does                                       |
| ------------------- | -------------------------------------------------- |
| `--team-id <id>`    | Team id from list\_teams. Required.                |
| `--channel-id <id>` | Required.                                          |
| `--is-default`      |                                                    |
| `--input <file>`    | Read the input as JSON from a file; - reads stdin. |

```bash
coline teams channels add -w acme --team-id <team-id> --channel-id <channel-id>
coline teams channels add -w acme --json '{"teamId":"<team-id>","channelId":"<channel-id>"}' --fields id
```

## teams channels remove

Unlinks a channel from a team; its people stay in it.

It removes or overwrites something, so it runs only with --confirm.

```text
coline teams channels remove [flags]
```

**Action** `teams.channels.remove` · **Effect** destructive, runs only with `--confirm` · **Can wait for your approval** no · **Scope** `tools.write` · **Workspace** yes, `-w`

| Flag                | What it does                                       |
| ------------------- | -------------------------------------------------- |
| `--team-id <id>`    | Team id from list\_teams. Required.                |
| `--channel-id <id>` | Required.                                          |
| `--input <file>`    | Read the input as JSON from a file; - reads stdin. |

```bash
coline teams channels remove -w acme --team-id <team-id> --channel-id <channel-id> --confirm
coline teams channels remove -w acme --json '{"teamId":"<team-id>","channelId":"<channel-id>"}' --fields id --confirm
```

## teams create

Creates a team in a team workspace, with its own drive and channel.

```text
coline teams create [flags]
```

**Action** `teams.create` · **Effect** write · **Can wait for your approval** no · **Scope** `tools.write` · **Workspace** yes, `-w`

| Flag                   | What it does                                       |
| ---------------------- | -------------------------------------------------- |
| `--name <text>`        | Required.                                          |
| `--description <text>` |                                                    |
| `--icon <text>`        | An emoji.                                          |
| `--input <file>`       | Read the input as JSON from a file; - reads stdin. |

```bash
coline teams create -w acme --name "…"
coline teams create -w acme --json '{"name":"…"}' --fields id
```

## teams drives add

Links a drive the person can open to a team.

```text
coline teams drives add [flags]
```

**Action** `teams.drives.add` · **Effect** write · **Can wait for your approval** no · **Scope** `tools.write` · **Workspace** yes, `-w`

| Flag              | What it does                                       |
| ----------------- | -------------------------------------------------- |
| `--team-id <id>`  | Team id from list\_teams. Required.                |
| `--drive-id <id>` | Required.                                          |
| `--is-default`    |                                                    |
| `--input <file>`  | Read the input as JSON from a file; - reads stdin. |

```bash
coline teams drives add -w acme --team-id <team-id> --drive-id <drive-id>
coline teams drives add -w acme --json '{"teamId":"<team-id>","driveId":"<drive-id>"}' --fields id
```

## teams drives remove

Unlinks a drive from a team; access to the drive doesn't change.

It removes or overwrites something, so it runs only with --confirm.

```text
coline teams drives remove [flags]
```

**Action** `teams.drives.remove` · **Effect** destructive, runs only with `--confirm` · **Can wait for your approval** no · **Scope** `tools.write` · **Workspace** yes, `-w`

| Flag              | What it does                                       |
| ----------------- | -------------------------------------------------- |
| `--team-id <id>`  | Team id from list\_teams. Required.                |
| `--drive-id <id>` | Required.                                          |
| `--input <file>`  | Read the input as JSON from a file; - reads stdin. |

```bash
coline teams drives remove -w acme --team-id <team-id> --drive-id <drive-id> --confirm
coline teams drives remove -w acme --json '{"teamId":"<team-id>","driveId":"<drive-id>"}' --fields id --confirm
```

## teams get

Reads a team: its people and their team roles, and the team's drives and channels.

It changes nothing.

```text
coline teams get [flags]
```

**Action** `teams.get` · **Effect** read, changes nothing · **Can wait for your approval** no · **Scope** `workspace.read` · **Workspace** yes, `-w`

| Flag             | What it does                                       |
| ---------------- | -------------------------------------------------- |
| `--team-id <id>` | Team id from list\_teams. Required.                |
| `--input <file>` | Read the input as JSON from a file; - reads stdin. |

```bash
coline teams get -w acme --team-id <team-id>
coline teams get -w acme --json '{"teamId":"<team-id>"}' --fields id
```

## teams list

Lists the teams in a team workspace with how many people are in each.

It changes nothing.

```text
coline teams list [flags]
```

**Action** `teams.list` · **Effect** read, changes nothing · **Can wait for your approval** no · **Scope** `workspace.read` · **Workspace** yes, `-w`

| Flag             | What it does                                       |
| ---------------- | -------------------------------------------------- |
| `--input <file>` | Read the input as JSON from a file; - reads stdin. |

```bash
coline teams list -w acme
coline teams list -w acme --json '{}' --fields id
```

## teams members add

Adds a workspace member to a team, as a member by default.

```text
coline teams members add [flags]
```

**Action** `teams.members.add` · **Effect** write · **Can wait for your approval** no · **Scope** `tools.write` · **Workspace** yes, `-w`

| Flag             | What it does                                                |
| ---------------- | ----------------------------------------------------------- |
| `--team-id <id>` | Team id from list\_teams. Required.                         |
| `--user-id <id>` | The person's user id (userId from list\_members). Required. |
| `--role <text>`  | One of `owner`, `admin`, `member`.                          |
| `--input <file>` | Read the input as JSON from a file; - reads stdin.          |

```bash
coline teams members add -w acme --team-id <team-id> --user-id <user-id>
coline teams members add -w acme --json '{"teamId":"<team-id>","userId":"<user-id>"}' --fields id
```

## teams members remove

Removes someone from a team; they stay in the workspace. People may remove themselves.

It removes or overwrites something, so it runs only with --confirm.

```text
coline teams members remove [flags]
```

**Action** `teams.members.remove` · **Effect** destructive, runs only with `--confirm` · **Can wait for your approval** no · **Scope** `tools.write` · **Workspace** yes, `-w`

| Flag             | What it does                                                |
| ---------------- | ----------------------------------------------------------- |
| `--team-id <id>` | Team id from list\_teams. Required.                         |
| `--user-id <id>` | The person's user id (userId from list\_members). Required. |
| `--input <file>` | Read the input as JSON from a file; - reads stdin.          |

```bash
coline teams members remove -w acme --team-id <team-id> --user-id <user-id> --confirm
coline teams members remove -w acme --json '{"teamId":"<team-id>","userId":"<user-id>"}' --fields id --confirm
```

## teams members update-role

Changes someone's role in a team (owner, admin or member).

```text
coline teams members update-role [flags]
```

**Action** `teams.members.updateRole` · **Effect** write · **Can wait for your approval** no · **Scope** `tools.write` · **Workspace** yes, `-w`

| Flag             | What it does                                                |
| ---------------- | ----------------------------------------------------------- |
| `--team-id <id>` | Team id from list\_teams. Required.                         |
| `--user-id <id>` | The person's user id (userId from list\_members). Required. |
| `--role <text>`  | Required. One of `owner`, `admin`, `member`.                |
| `--input <file>` | Read the input as JSON from a file; - reads stdin.          |

```bash
coline teams members update-role -w acme --team-id <team-id> --user-id <user-id> --role owner
coline teams members update-role -w acme --json '{"teamId":"<team-id>","userId":"<user-id>","role":"owner"}' --fields id
```

## teams update

Renames a team or changes its description or icon.

```text
coline teams update [flags]
```

**Action** `teams.update` · **Effect** write · **Can wait for your approval** no · **Scope** `tools.write` · **Workspace** yes, `-w`

| Flag                   | What it does                                       |
| ---------------------- | -------------------------------------------------- |
| `--team-id <id>`       | Team id from list\_teams. Required.                |
| `--name <text>`        |                                                    |
| `--description <text>` |                                                    |
| `--icon <text>`        | An emoji.                                          |
| `--input <file>`       | Read the input as JSON from a file; - reads stdin. |

```bash
coline teams update -w acme --team-id <team-id>
coline teams update -w acme --json '{"teamId":"<team-id>"}' --fields id
```
