Skip to main content
Manage authentication. Each subcommand has its own section below, in alphabetical order.
To authenticate without a stored login, such as in CI, set GUILD_API_KEY. See Environment variables.

login

Log in to Guild with a browser-based device flow. The CLI shows a verification code, then opens the verification URL in your browser when you press Enter.
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. 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 the global --non-interactive option to skip the browser launch outright. After you log in, the CLI also configures the Guild npm registry and its auth token in your user-level ~/.npmrc. If that step fails, for example because npm isn’t installed, the CLI prints an error but you stay logged in.

logout

Log out of Guild. guild auth logout removes the token from both the OS keyring and the auth-token.json fallback file, and removes the Guild registry entries from your user-level ~/.npmrc.
guild auth logout doesn’t affect GUILD_API_KEY. To stop using an API key, unset the variable.

status

Show whether you’re authenticated and as whom.
When you’re logged in, the command shows your name and user ID. If your stored token has expired, it reports that you’re not authenticated and suggests running guild auth login. If the CLI can’t reach Guild, it reports that you’re authenticated without your profile. When GUILD_API_KEY is set, the command reports the key ID in use instead of checking a stored login. The key isn’t verified until the first command that makes a request. See Environment variables.

token

Print the current auth token to stdout, for use in scripts.
When GUILD_API_KEY is set, the command prints that key instead of a stored token. If you’re not authenticated, the command exits with code 1.
Last modified on October 15, 2026