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

# bt switch

> Switch the active Braintrust profile, organization, and project context.

`bt switch` saves your active Braintrust profile, organization, and project context. Commands use that saved context unless you override it with flags or environment variables.

```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
bt switch
bt switch my-project
bt switch personal-org/my-project
```

Without a target, `bt switch` prompts you to choose a compatible profile, organization, and project.

## Arguments

| Argument | Description                    |
| -------- | ------------------------------ |
| `TARGET` | Project name, or `org/project` |

## Flags

| Flag             | Description                                                                           |
| ---------------- | ------------------------------------------------------------------------------------- |
| `--global`, `-g` | Save the context to `~/.config/bt/config.json` (or `$XDG_CONFIG_HOME/bt/config.json`) |
| `--local`, `-l`  | Save the context to the nearest `.bt/config.json`. Requires a local `.bt` directory   |

When you run `bt switch` without a target and a `.bt/config.json` exists in the current directory or a parent directory, the command prompts you to save the context locally or globally. Otherwise, it saves the context globally. When you provide a target, use `--local` to save it to the nearest `.bt/config.json` instead of the global config.
