# team

> Teams in your organization, nested; owners and admins manage them.

Teams in your organization, nested; owners and admins manage them.

## nexus team list

```sh
nexus team list
```

Teams in your organization, with yours marked.

## nexus team tree

```sh
nexus team tree [--depth N]
```

Teams nested under their parents, with levels, leads and headcount.

| Option | Meaning |
| --- | --- |
| `--depth <N>` | How many levels of teams to show or roll up |

## nexus team show

```sh
nexus team show <slug>
```

A team: its path, child teams, members and pending members.

## nexus team create

```sh
nexus team create <slug> [--parent P] [--level L] [--name N]
```

Create a team, optionally under a parent (owners and admins).

| Option | Meaning |
| --- | --- |
| `--parent <P>` | The parent team's slug |
| `--level <L>` | Your own label for the team's level (e.g. department) |
| `--name <N>` | A display name |

```sh
nexus team create web --name "Web"
```

## nexus team move

```sh
nexus team move <slug> --parent P | --root
```

Put a team under another one, or at the top (owners and admins).

| Option | Meaning |
| --- | --- |
| `--parent <P>` | The parent team's slug |
| `--root` | Put the team at the top, under no parent |

## nexus team rename

```sh
nexus team rename <slug> <new-slug> [--name N]
```

Change a team's slug, name, --level or --description (owners and admins).

| Option | Meaning |
| --- | --- |
| `--name <N>` | A display name |
| `--level <L>` | Your own label for the team's level (e.g. department) |
| `--description <text>` | A description |

## nexus team delete

```sh
nexus team delete <slug> --yes [--cascade]
```

Delete a team (--cascade: and every team under it); spend stays.

| Option | Meaning |
| --- | --- |
| `--yes` | Confirm a change that deletes or sends more than one thing |
| `--cascade` | Also delete every team under it |

## nexus team add

```sh
nexus team add <slug> <email|userId> [--lead] [--home]
```

Add someone; an email not in the organization yet is pending until they join.

| Option | Meaning |
| --- | --- |
| `--lead` | Add the person as a lead |
| `--home` | Make it the person's default team |

```sh
nexus team add web bo@acme.example
```

## nexus team remove

```sh
nexus team remove <slug> <email|userId>
```

Take someone out of a team (owners and admins).

## nexus team pending

```sh
nexus team pending [--team T] [--cancel <email|id>]
```

People added by email who have not joined yet (owners and admins).

| Option | Meaning |
| --- | --- |
| `--team <T>` | Only people pending in this team |
| `--cancel <email|id>` | Cancel a pending member (email or id) |

## nexus team import

```sh
nexus team import <file> [--dry-run] [--plan P] [--prune [--yes]]
nexus team import <file> --invite [--dry-run] [--yes]
```

Load teams, leads and members from a YAML or JSON file; --dry-run shows the changes and a plan to apply exactly them (owners and admins).

- `nexus team import <file> --invite [--dry-run] [--yes]`: Also invite the file's people who are not in the organization yet (the sign-in provider emails them; never without --invite).

| Option | Meaning |
| --- | --- |
| `--dry-run` | Show what would change, change nothing |
| `--plan <P>` | Apply exactly the plan a dry run printed |
| `--prune` | Also remove teams and memberships missing from the file |
| `--yes` | Confirm a change that deletes or sends more than one thing |
| `--invite` | Also invite the file's people who are not in the organization yet |

```sh
nexus team import teams.yaml --dry-run
```

## nexus team use

```sh
nexus team use <slug>
```

Make it your default team: where your spend goes when you name none.
