# ox teams (/docs/cli/commands/teams)



ox teams [#ox-teams]

List all teams available to you, showing which is primary for the current repository.

Usage [#usage]

<Terminal>
  <TerminalCommand>
    ox teams
  </TerminalCommand>
</Terminal>

Example Output [#example-output]

<Terminal>
  <TerminalCommand>
    ox teams
  </TerminalCommand>

  <TerminalOutput>
    NAME           ID              PRIMARY
    acme-eng       team\_abc123     \*
    acme-design    team\_def456
    side-project   team\_ghi789
  </TerminalOutput>
</Terminal>

The `*` marker indicates the primary team for this repository. The primary team determines which [Team Context](/docs/features/team-context) is loaded when you run `ox agent prime`.

How Primary Team Is Determined [#how-primary-team-is-determined]

When you run `ox init`, the CLI associates your repository with a team. This becomes the primary team for that repo, stored in `.sageox/config.toml`.

If you belong to multiple teams, you can switch the primary team:

<Terminal>
  <TerminalCommand>
    ox init --team acme-design
  </TerminalCommand>
</Terminal>

Flags [#flags]

| Flag     | Description                  |
| -------- | ---------------------------- |
| `--json` | Output as JSON for scripting |

JSON Output [#json-output]

```bash
ox teams --json
```

```json
{
  "teams": [
    {
      "team_id": "team_abc123",
      "name": "acme-eng",
      "slug": "acme-eng",
      "primary": true,
      "last_sync": "2026-04-13T10:30:00Z",
      "path": "~/.sageox/teams/acme-eng"
    },
    {
      "team_id": "team_def456",
      "name": "acme-design",
      "slug": "acme-design",
      "primary": false
    }
  ]
}
```

Related Commands [#related-commands]

* [ox init](/docs/cli/init) - Initialize a repository with a specific team
* [Team Context](/docs/features/team-context) - Learn about team-level shared knowledge
