Check which account is signed in or sign out

getting started

// what it does

codex login status prints whether you are authenticated via ChatGPT or an API key, so you can confirm what you are being billed against. codex logout clears the stored credentials from ~/.codex/auth.json. The storage backend is set by cli_auth_credentials_store: file (auth.json), keyring (OS store), or auto.

// shell

$ codex login status
$ codex logout

// gotcha

If you are unexpectedly billed per token, run codex login status — a leftover OPENAI_API_KEY login bills the API account instead of your ChatGPT subscription.

// resources