For the complete documentation index, see llms.txt. This page is also available as Markdown.

logout

Sign a profile out. celigo logout revokes the profile's OAuth session at the authorization server — its refresh token and its access token — and removes the session from ~/.celigo/config.json. The profile keeps its other settings and its environment binding, and holds no credential until you sign in again with celigo login.

logout manages local credentials, so it is never mode-gated.

Added in celigo-cli 2026.10.1.

REST API: Authentication

celigo logout [flags]

Supports all global flags.


celigo logout

Revoke and forget the OAuth session of the selected profile — --profile, else CELIGO_PROFILE, else the active profile.

Signature

celigo logout

Arguments

None.

Flags

Uses global flags only.

Example

celigo logout                               # the active profile
celigo logout --profile acme-corp-sandbox   # a named profile

Corresponds to: the OAuth token revocation endpoint the issuer's metadata advertises — once for the refresh token, then once for the access token. No /v1 API request is made.

What logout reports

  • A revocation it could not make. The issuer unreachable, a token its endpoint refused, or no revocation endpoint in the issuer's metadata is said on stderr. The profile is signed out on this machine either way, and any token not revoked stays valid on the server until it expires:

  • Other sign-ins the revocation may have ended. Sign-ins made from the same browser session share one OAuth grant on the platform, and revoking one session's refresh token revokes the grant. After the sign-out, logout names the other signed-in profiles at the same issuer or bound to the same environment, on stderr; they need celigo login again if the grant was theirs too:

  • A profile that does not exist. A misspelled --profile or CELIGO_PROFILE fails, exit 1, instead of reporting a sign-out that never happened: Profile 'acme-corp-prod' does not exist. Available: acme-corp-production, acme-corp-sandbox (run 'celigo profile list').

  • A profile that is not signed in. Profile 'acme-sandbox' is not logged in. (exit 0). logout removes an OAuth session only; to clear a profile's API token, run celigo config unset api_token.

  • A session block the CLI cannot read — one left by a hand edit or an older build, missing its access token, client id, or issuer. logout removes it, says so, and revokes nothing, since the block holds nothing it could revoke:

Commands running in parallel

The revocation and the removal run as one step under the session lock (~/.celigo/oauth.lock), so no renewal can swap the tokens in between and leave the new ones live on the server. A celigo command renewing the same session in another terminal finishes first, and the tokens it stored are the ones revoked. A command that has to renew the session after the sign-out fails at once, without waiting for the lock or spending the revoked refresh token:


Gotchas

  • The environment binding stays. The profile still references the environment it was bound to (identity), so the next celigo login into it is refused if it reaches another account or environment, unless --allow-account-mismatch. See The environment binding.

  • Deleting the config file is not a sign-out. Removing ~/.celigo/config.json or a profile's oauth block by hand revokes nothing: the session's tokens stay valid on the server until they expire. Run logout first. profile delete of a signed-in profile revokes its session as logout does.

  • Under profile_pin_policy = strict. A --profile or CELIGO_PROFILE naming any profile other than the active one is refused with the policy's refusal, before anything is read or revoked. Under the default allow, logout on a profile pinned away from the active one prints celigo: profile 'acme-corp-sandbox' → api.integrator.io (pinned with --profile; the active profile is 'acme-corp-production') on stderr first. See Refusing a pinned profile.

  • CELIGO_API_TOKEN is not affected. logout clears only the profile's stored session; a token in --token or CELIGO_API_TOKEN keeps working, because it wins over the profile's credential.

  • login — sign in again, and how a session is bound and renewed.

  • profile — profile delete revokes a signed-in profile's session; profile whoami shows what a profile authenticates as.

  • config — config unset api_token clears an API token.

  • Authenticate — the two credentials, and rotating them.

Last updated

Was this helpful?