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

# Team

> Team lifecycle management — create, hire, fire, list, and disband teams.

# Team Commands

CRUD for [team](/genie/concepts/teams) lifecycle with worktree management.

## `genie team create`

Create a new team with a git worktree.

```bash theme={"dark"}
genie team create <name> --repo <path> [--branch dev] [--wish <slug>] [--tmux-session <name>] [--no-spawn]
```

```bash Terminal theme={"dark"}
$ genie team create auth-rewrite --repo . --wish add-oauth --branch dev
✅ Team "auth-rewrite" created
  Worktree: ~/.genie/worktrees/myapp/auth-rewrite
  Branch:   team/auth-rewrite (from dev)
  Wish:     add-oauth
  Leader spawned with wish context.
```

### Options

| Flag                    | Description                                             | Default      |
| ----------------------- | ------------------------------------------------------- | ------------ |
| `--repo <path>`         | Path to the git repository                              | **Required** |
| `--branch <branch>`     | Base branch to create from                              | `dev`        |
| `--wish <slug>`         | Wish slug — auto-spawns a team leader with wish context | —            |
| `--tmux-session <name>` | tmux session name (avoids session explosion)            | —            |
| `--no-spawn`            | Create team without spawning a leader agent             | —            |

<Note>
  Pair `--wish <slug>` with an existing wish to auto-spawn a team leader preloaded with that wish's context. Use `--no-spawn` when you want the team scaffold without burning tokens — handy for tests or staged rollouts.
</Note>

<Tip>
  The `--wish` flag is the fastest path from "I have a wish" to "work is happening." It creates the worktree, checks out the branch, and hands the leader the WISH.md so it can dispatch execution groups immediately.
</Tip>

## `genie team hire`

Add an agent to a team. Use `council` to hire all 10 council members at once.

```bash theme={"dark"}
genie team hire <agent> [--team <name>]
```

```bash Terminal theme={"dark"}
$ genie team hire engineer --team auth-rewrite
Hired "engineer" to team "auth-rewrite".

$ genie team hire council --team auth-rewrite
Hired 10 council members to "auth-rewrite":
  + council-questioner
  + council-benchmarker
  + council-simplifier
  + council-sentinel
  + council-ergonomist
  + council-architect
  + council-operator
  + council-deployer
  + council-measurer
  + council-tracer
```

## `genie team fire`

Remove an agent from a team.

```bash theme={"dark"}
genie team fire <agent> [--team <name>]
```

```bash Terminal theme={"dark"}
$ genie team fire engineer --team auth-rewrite
Removed "engineer" from team "auth-rewrite".
```

## `genie team ls`

List teams or show details for a specific team.

```bash theme={"dark"}
genie team ls [<name>]
```

```bash Terminal theme={"dark"}
$ genie team ls
Teams:
  auth-rewrite    3 members   active
  dream-0324      5 members   active

$ genie team ls auth-rewrite
Team: auth-rewrite
  Repo:     ~/projects/myapp
  Worktree: ~/.genie/worktrees/myapp/auth-rewrite
  Branch:   team/auth-rewrite
  Members:
    team-lead   (leader)
    engineer    (agent)
    reviewer    (agent)
```

## `genie team archive`

Archive a team. Preserves all data but kills active members.

```bash theme={"dark"}
genie team archive <name>
```

```bash Terminal theme={"dark"}
$ genie team archive auth-rewrite
Archived team "auth-rewrite".
  Members terminated.
  Data preserved — use 'genie team unarchive' to restore.
```

## `genie team unarchive`

Restore an archived team.

```bash theme={"dark"}
genie team unarchive <name>
```

```bash Terminal theme={"dark"}
$ genie team unarchive auth-rewrite
Restored team "auth-rewrite".
```

## `genie team disband`

Disband a team and clean up its worktree.

```bash theme={"dark"}
genie team disband <name>
```

```bash Terminal theme={"dark"}
$ genie team disband auth-rewrite
Disbanded team "auth-rewrite".
  Worktree removed.
  Agents terminated.
```

<Warning>
  `genie team disband` deletes the team's worktree and terminates its agents. Uncommitted changes in the worktree are lost. If you only want to pause the team, use `genie team archive` — it preserves data and can be restored with `unarchive`.
</Warning>

## `genie team done`

Mark a team's work as complete.

```bash theme={"dark"}
genie team done <name>
```

```bash Terminal theme={"dark"}
$ genie team done auth-rewrite
Marked team "auth-rewrite" as done.
```

## `genie team blocked`

Mark a team as blocked.

```bash theme={"dark"}
genie team blocked <name>
```

```bash Terminal theme={"dark"}
$ genie team blocked auth-rewrite
Marked team "auth-rewrite" as blocked.
```

## `genie team cleanup`

Clean up orphaned team resources (stale worktrees, dead tmux sessions).

```bash theme={"dark"}
genie team cleanup [--dry-run]
```

```bash Terminal theme={"dark"}
$ genie team cleanup
Cleaned up 2 orphaned worktrees and 1 dead tmux session.
```

## Auto-Detection

When `--team` is omitted, genie auto-detects the team from the leader context (environment variables or tmux session).

## See also

<CardGroup cols={2}>
  <Card title="Teams (concept)" icon="users-gear" href="/genie/concepts/teams">
    How teams, worktrees, and leaders fit together.
  </Card>

  <Card title="Spawn & Lifecycle" icon="rocket" href="/genie/cli/spawn">
    Spawn, stop, resume, and kill the individual agents within a team.
  </Card>

  <Card title="Dispatch" icon="paper-plane" href="/genie/cli/dispatch">
    Dispatch wish-aware commands (`wish`, `work`, `review`) that the leader uses.
  </Card>

  <Card title="Messaging" icon="message" href="/genie/cli/messaging">
    Send instructions to team members while work is in flight.
  </Card>
</CardGroup>
