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

# atlanai context

> Save and select the workspace used by Registry CLI commands.

Context removes the need to pass `--workspace` on every supported Registry
command. It is local to this machine and does not change trace attribution.

## Commands

### use

Selects a workspace for supported Registry commands. Omit `[workspace]` to
choose from an interactive list.

**Usage**

```text theme={null}
atlanai context use [workspace] [flags]
```

`[workspace]` can be a workspace ID or display name. An ambiguous display name
prompts instead of guessing.

| Option | Type   | Default                | Description                          |
| ------ | ------ | ---------------------- | ------------------------------------ |
| `--as` | string | workspace display name | Save the context under a local name. |

### show

Shows the active workspace ID and local context name.

**Usage**

```text theme={null}
atlanai context show
```

### list

Lists saved workspace contexts on this machine.

**Usage**

```text theme={null}
atlanai context list [flags]
```

| Option             | Type        | Default | Description                                 |
| ------------------ | ----------- | ------- | ------------------------------------------- |
| `--json`           | string list | none    | Select `workspace_id` and `workspace_name`. |
| `--jq`, `-q`       | string      | none    | Filter JSON output with jq.                 |
| `--template`, `-t` | string      | none    | Render JSON data with a Go template.        |

## Examples

```bash theme={null}
atlanai context use workspace_123 --as platform
atlanai context show
atlanai context list --json workspace_id,workspace_name
```

## Output and behavior

* The selected context is stored only on the current machine.
* A command's explicit `--workspace` value overrides the saved context once.
* `--all-workspaces` makes account-wide list/search intent explicit.
* Trace capture resolves its own workspace independently.

## Related

* [Get started with the CLI](/cli/get-started)
* [`atlanai workspace`](/cli/reference/workspace)
* [Work with Registry](/cli/registry)
