# slack

> The Nexus Slack app (owners and admins): bind a Slack workspace to your organization through Slack's install. Only the person who started an install confirms it, and a workspace binds to one organization at a time. A channel binds to a team: in a bound channel, @nexus attributes each call to that team, under its policy and caps; a team lead binds a channel to a team they lead.

The Nexus Slack app (owners and admins): bind a Slack workspace to your organization through Slack's install. Only the person who started an install confirms it, and a workspace binds to one organization at a time. A channel binds to a team: in a bound channel, @nexus attributes each call to that team, under its policy and caps; a team lead binds a channel to a team they lead.

## nexus slack connect

```sh
nexus slack connect [--confirm <install-id>] [--dry-run]
```

Connect a Slack workspace: print Slack's install link; approve the app in the browser where you are signed in to Nexus UI, which completes the install; then --confirm binds that workspace to this organization (owners and admins).

| Option | Meaning |
| --- | --- |
| `--confirm <install-id>` | The install id (chw_…) that nexus slack connect printed: binds its workspace once you approved the app in Slack |
| `--dry-run` | Show what would change, change nothing |

```sh
nexus slack connect
nexus slack connect --confirm chw_… --dry-run
nexus slack connect --confirm chw_…
```

## nexus slack status

```sh
nexus slack status
```

The organization's Slack workspaces, pending and active (owners and admins).

```sh
nexus slack status --json
```

## nexus slack disconnect

```sh
nexus slack disconnect <id> [--dry-run]
```

Unbind a workspace: Gateway uninstalls the app from it and deletes its bot token, unless another binding of the organization still uses it (owners and admins).

| Option | Meaning |
| --- | --- |
| `--dry-run` | Show what would change, change nothing |

```sh
nexus slack disconnect chw_… --dry-run
```

## nexus slack channel list

```sh
nexus slack channel list <workspace id>
```

The workspace's channels bound to a team (owners and admins: every one; a lead: those of the teams they lead).

```sh
nexus slack channel list chw_…
```

## nexus slack channel bind

```sh
nexus slack channel bind <workspace id> <channel id> --team <slug>
```

Bind a channel to a team: its calls go to that team, under its policy and caps (owners and admins: any team; a lead: a team they lead).

| Option | Meaning |
| --- | --- |
| `--team <slug>` | The team the channel's calls go to, by slug or id (a lead: a team they lead or one under it) |

```sh
nexus slack channel bind chw_… C0123ABCD --team web
```

## nexus slack channel unbind

```sh
nexus slack channel unbind <workspace id> <channel id>
```

Unbind a channel from its team.

```sh
nexus slack channel unbind chw_… C0123ABCD --json
```
