Organizations¶
Manage organizations.
Aliases: organization, org, orgs
List Organizations¶
Alias: ls
Lists all organizations you belong to. Only requires a token (no --org-id needed). For accounts with multiple memberships the list shows every organization you can reach.
Switch Active Organization¶
Saves the chosen organization as org-id in ~/.bnerd.yaml. Every subsequent request will carry ?organization_id=<org-id> so the API scopes data to that organization.
The command validates membership before saving: a non-member org-id is rejected (fail-closed). For single-org accounts the command still works — it just re-confirms the only available organization.
Get Organization Details¶
If no org-id is provided, uses the configured org-id.
Create Organization (admin only)¶
This command is admin-only and calls POST /admin/organizations. Non-admin accounts receive a 403 Forbidden error.
The --account-id identifies the owner account: an Admin membership for that account is minted alongside the new organization shell.
Flags¶
| Flag | Type | Required | Description |
|---|---|---|---|
--name | string | Yes | Organization name |
--account-id | string | Yes | Owner account ID (Admin membership minted for this account) |
Update Organization¶
If no org-id is provided, uses the configured org-id.
Flags¶
| Flag | Type | Description |
|---|---|---|
--name | string | Organization name |
--street | string | Street address |
--city | string | City |
--postal-code | string | Postal code — sent to the API as zip_code |
--country | string | Country — ISO 3166-1 alpha-2 (e.g. DE), uppercased automatically |
--state | string | State/Province |
Partial updates¶
Only the flags you pass are sent to the API. Any address field you don't specify is left untouched — omitted flags are not cleared or blanked. For example, bnerd organizations update --city Hamburg changes only the city; street, postal code, country, and state keep their existing values.
Invalid country¶
If --country isn't a valid ISO 3166-1 alpha-2 code, the API rejects the request with a 422 and a message such as:
Delete Organization¶
Features¶
Manage organization feature flags.
Get Features¶
Set Feature¶
Examples¶
# List all organizations
bnerd org list
# Switch active org via interactive menu
bnerd org switch
# Switch directly to a known org-id
bnerd org switch org-abc123
# Get current org details
bnerd org get
# Create org (admin only) — mints an Admin membership for the owner account
bnerd org create --name "ACME Corp" --account-id acc-abc123
# Update name
bnerd org update --name "New Name"
# View features
bnerd org features get
TUI Equivalent¶
In the interactive TUI (bnerd x), use the :organizations or :org command.