> ## Documentation Index
> Fetch the complete documentation index at: https://docs.guild.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# guild auth

> Log in to Guild, log out, and inspect your authentication state.

Manage authentication.

```bash theme={null}
guild auth login              # Log in via browser OAuth
guild auth logout             # Remove stored token
guild auth status             # Show authentication state
guild auth token              # Print the current auth token
```

<Note>
  `guild auth login` stores your token in the OS keyring when one is available. On a headless host with no keyring, it falls back to a file named `auth-token.json` in the global config directory (`GUILD_CONFIG_DIR`, or `~/.guild` when unset). The CLI writes the file with `0600` permissions and keys each entry by host, so several hosts can share one config directory. `guild auth logout` removes the token from both the keyring and the fallback file.

  On a headless host there is also no browser to launch. `guild auth login` prints the verification code and URL and keeps polling rather than failing, so the flow still completes from another machine. Pass `--non-interactive` to skip the browser launch outright.
</Note>
