Skip to main content

bonya org

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.
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

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

use

Aliases: u, select
Saves an organization as the default for future commands. Omit the argument to pick from a list.
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

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

clear

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

How the selection is applied

The saved selection is stored in the same config file bonya login writes to (see Configuration), 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.
--organization-id (flag or BONYA_ORGANIZATION_ID environment variable) always overrides whatever org use has saved — see the precedence order in Configuration.