Skip to main content
Removes stored credentials from this machine. It never selects a replacement organization.

Flags

string
Remove the named organization instead of the selected one.
boolean
default:"false"
Remove every organization stored on this machine. Can’t be combined with --org.
boolean
default:"false"
Print the result as JSON on stdout.

Examples

Output

With --json:
If nothing was stored, the command still succeeds and says Nothing to remove; no local credentials were stored.

Behavior

  • Logging out doesn’t revoke the key. It only removes the key from this machine. To make a key unusable everywhere, revoke it on the API Keys page.
  • Keys are removed before the context file is updated. If something fails part-way, the organization stays listed but has no key, and running logout again clears it.
  • A locked keychain never looks like a logout. If the keychain can’t be reached, nothing is removed and the command fails with CREDENTIAL_STORE_UNAVAILABLE.
  • No new selection. After logging out of the selected organization, no organization is selected until you run sabaoth org use or sabaoth login.

When SABAOTH_API_KEY is set

A plain sabaoth logout fails with ENV_CREDENTIAL_ACTIVE (exit 2). There’s no local session to end, and the environment variable is what commands are actually using. Unset it to stop using it:
--org and --all still clean up local state, with a warning that the environment variable is still active.

Errors