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

# org

> Choose which organization your commands act in by default

## `bonya org`

> [!NOTE]
>
> Aliases: `orgs`, `o`

An API key belongs to a user, not an organization, so one key works across every organization you belong to. `org` controls which one your commands act in by default, so you don't have to pass `--organization-id` on every command.

Running `bonya org` with no subcommand does the same thing as `bonya org list`.

```shell theme={null}
bonya org list             # table of organizations, marking the current one
bonya org use <name|id>    # save as default; no argument opens a picker
bonya org show             # what is currently in effect, and where it came from
bonya org clear            # fall back to your personal organization
```

> [!NOTE]
>
> Your personal organization — the one every account always has — is displayed as `personal`, not your own name or email. The CLI doesn't reliably know what to call it otherwise.

## `list`

> [!NOTE]
>
> Aliases: `ls`, `l`

Lists the organizations you belong to as a table, marking which one is currently selected.

```shell theme={null}
bonya org list
```

## `use`

> [!NOTE]
>
> Aliases: `u`, `select`

Saves an organization as the default for future commands. Omit the argument to pick from a list.

```shell theme={null}
bonya org use [name-or-id]
```

```shell theme={null}
bonya org use Acme
bonya org use org-4f1c9a2b3c4d5e6f7a8b9c0d1e2f3a4b
bonya org use
```

The name is resolved to an id before saving — the value written to disk is always an id, never a name, since a name can be renamed out from under a saved selection but an id can't. If the name matches more than one organization, `use` narrows an interactive picker to just those matches (or fails with the list of ids, non-interactively).

## `show`

> [!NOTE]
>
> Aliases: `current`, `s`

Shows the organization currently in effect and where that value came from (flag, environment variable, or saved selection).

```shell theme={null}
bonya org show
```

## `clear`

Removes the saved organization selection, falling back to your personal organization.

```shell theme={null}
bonya org clear
```

## How the selection is applied

The saved selection is stored in the same config file `bonya login` writes to (see [Configuration](https://docs.bonya.ai/cli-reference/configuration.md)), and follows the same rule the web dashboard uses: a saved selection wins while you're still a member of it, and silently falls back to your personal organization the moment you're not.

```shell theme={null}
bonya org use Acme
bonya list                 # now scoped to Acme with no flag
```

`--organization-id` (flag or `BONYA_ORGANIZATION_ID` environment variable) always overrides whatever `org use` has saved — see the precedence order in [Configuration](https://docs.bonya.ai/cli-reference/configuration.md#precedence).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.