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

# Workspace commands

> Authenticate and manage your session and organization context

## login

Authenticate the CLI with your Synthetiq account:

```bash theme={null}
synthetiq login
```

Opens your default browser for OAuth authentication. Once authenticated, the CLI establishes the organization context and determines the workspace directory at `~/.synthetiq/<userId>/<orgId>/`.

## logout

Clear stored credentials:

```bash theme={null}
synthetiq logout
```

## whoami

Display the current authenticated user, organization, role, and the scopes you
hold in that organization:

```bash theme={null}
synthetiq whoami
```

```
User:          you@example.com
Organization:  Acme Corp
Role:          Admin
Workspace:     ~/.synthetiq/<userId>/<orgId>
Scopes:
  platform:deploy:write
  platform:entities:read
  platform:entities:write
```

The role and scopes are read from your current access token, so they reflect
the organization you are currently in (switch with `org switch`). In a personal
workspace there is no org role and no scopes.

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

## org list

List the organizations you belong to. The current organization is flagged in
the `CURRENT` column:

```bash theme={null}
synthetiq org list
```

```
ID                                     NAME        SLUG        TYPE           CURRENT
23ef2ed2-13d3-48cd-ba23-b7942ace53ef   Acme Corp   acme-corp   organization   *
9c70-2f6b1a8e5d23-…                    Personal    personal    personal
```

| Flag     | Description                                         |
| -------- | --------------------------------------------------- |
| `--json` | Output as JSON (each org includes a `current` flag) |

## org switch

Switch the active organization context:

```bash theme={null}
synthetiq org switch [name]
```

`[name]` can be an organization's name, slug, or ID. Omit it to choose
interactively from the organizations you belong to. Switching re-establishes
the org context and updates the workspace directory used by subsequent
commands.

```bash theme={null}
synthetiq org switch acme-corp
```

## org get

Show details for a specific organization:

```bash theme={null}
synthetiq org get <org-id> [--json]
```
