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

# Profiles and Teams

> Manage stored CLI profiles, switch between teams, and inspect team membership with the Duvo CLI.

The CLI stores credentials as **named profiles** — each holds either an OAuth session or an API key, so you can switch between teams or workspaces without re-entering credentials. This page is the reference for managing those profiles and the teams they act on. For first-time sign-in, see [Sign in](/cli/index#sign-in).

## Profiles

```bash theme={"dark"}
duvo whoami                          # show the active profile, its key prefix, and team
duvo profiles list                   # list all stored profiles (the default is marked)
duvo profiles use [name]             # switch the default profile (interactive picker if name omitted)
duvo profiles rename <old> <new>     # rename a profile, preserving its credentials
duvo profiles remove <name>          # remove a profile locally
```

### Use a different profile for a single command

```bash theme={"dark"}
duvo agents list --profile staging
```

`--profile <name>` works on every command and doesn't change your default.

### Sign out

```bash theme={"dark"}
duvo logout                          # sign out of the active profile
duvo logout --name <profile>         # sign out of a specific profile
duvo logout --all                    # sign out of every stored profile
```

`duvo logout` revokes the OAuth tokens server-side and removes the profile locally.

### Environment variables

For non-interactive use (CI, scripts), the CLI also reads:

| Variable       | Description                                    |
| -------------- | ---------------------------------------------- |
| `DUVO_API_KEY` | API key — bypasses the stored profile entirely |
| `DUVO_PROFILE` | Profile name to use instead of the default     |

## Teams

A profile's credentials are scoped to a team. Use these commands to confirm which team you're acting on and inspect its members before running commands that change data.

```bash theme={"dark"}
duvo team current                                                  # the team scoped to your active credentials
duvo team get                                                      # full details for that team
duvo team use <team-id>                                            # set the team for the active profile
duvo team members [--team <team-id>] [--limit <n>] [--offset <n>]  # list team members
duvo teams list                                                    # list every team your credentials can act on
duvo teams orgs                                                    # list the organizations you belong to and your role in each
duvo teams org <org-id>                                            # list all teams in an organization you belong to
duvo teams create-org-team <org-id> --name <name>                  # create a new team in an organization you administer (org Admin, Executive, or Owner)
duvo teams invite-org-member <org-id> --email <email> [--role] [--team-id] [--frontend-url]  # invite a person to an org, optionally onto a team (org Admin, Executive, or Owner)
duvo teams org-insights <org-id> [--start-date] [--end-date]       # org-wide run KPIs across all teams (org admins and above)
duvo teams org-metrics <org-id> [--start-date] [--end-date]        # per-team run metrics across the org (org admins and above)
duvo teams org-usage <org-id> [--granularity day|week|month]       # org-wide run volume over time (org admins and above)
```

If `--team` is omitted, member listing uses the team scoped to your API key or active profile. Add `--json` to any command for machine-readable output.

### Confirm your team before a destructive command

```bash theme={"dark"}
duvo team current --json | jq -r '.team.name'
```

<Warning>Running this first is a cheap way to make sure a bulk delete or delegate lands on the team you intend.</Warning>

## Related

<CardGroup cols={2}>
  <Card title="Duvo CLI" icon="terminal" href="/cli/index">
    installation and first sign-in
  </Card>

  <Card title="Scripting and CI/CD Patterns" icon="git-branch" href="/cli/scripting-and-ci">
    authenticating with API keys in pipelines
  </Card>
</CardGroup>
