Skip to main content
Remove the saved credential from the config file. Subsequent authenticated commands will fail with auth_required (exit 3) until you run clay login again, unless CLAY_API_KEY is set in the environment.
clay logout
The command is idempotent — if no key is saved (or the config file is missing), it is a no-op and still exits 0. Only the default profile is removed; other profiles in the file are preserved.

Output

{ "ok": true }

Examples

clay logout
clay logout && clay whoami   # whoami now exits 3 with auth_required (when CLAY_API_KEY is unset)