Optibot CLI — Organizations & Status — Optimal Docs

Organizations & Account Status

The Optibot CLI always acts as exactly one organization at a time. Your review quota, repositories, API keys, and security scans all belong to that active organization. If you belong to more than one organization, the CLI gives you commands to see which one is active and to switch between them.

How the Active Organization Works

When you authenticate, Optibot issues a token that is scoped to a single organization. The active organization is encoded in that token, not stored separately on disk. Switching organizations means exchanging your current token for a new one scoped to the organization you pick.

A few consequences worth knowing:

Checking Your Status

Run optibot status to see how you are authenticated, which organization is active, and how much of your review quota remains:

optibot status

The output includes:

Listing Your Organizations

optibot org list

Lists every organization you belong to. The active one is marked with a *, and your role in each is shown in parentheses.

Showing the Active Organization

optibot org current

Prints just the currently active organization and your role in it.

Switching Organizations

optibot org switch

Opens an interactive arrow-key picker of your organizations. Selecting a different one re-scopes your stored session to that organization. If you only belong to one organization, there is nothing to switch and the command says so.

Heads up: API keys are bound to the organization active at the time they were created. After switching, run optibot setup ci (or optibot apikey create <name>) if you need a key that acts as the newly selected organization.

optibot org switch requires an interactive terminal. In a non-interactive environment (such as CI), set the correct organization on a dev machine first and use the API key it produces.

Command Reference

Command Description
optibot status Show auth method, active organization, role, and review quota
optibot org list List organizations you belong to (active marked with *)
optibot org current Show the currently active organization
optibot org switch Switch the active organization (interactive)