Skip to content

Sign out

Use leaf logout to terminate your session and clear saved tokens from your local machine.

Run leaf logout:

Terminal window
leaf logout

Output:

Logged out.
  1. The CLI calls the LeafCloud API to invalidate the current authentication session on the server.
  2. The local credentials file (~/.config/leaf/credentials.json) is securely deleted.
  3. If authentication was provided via the LEAF_TOKEN environment variable, the server session is revoked, but the local environment variable remains unchanged.

With --json:

Terminal window
leaf logout --json
{
"schema": 1,
"logged_out": true
}