Skip to main content
Manage authentication for the CLI. Platform mode is the default and uses browser OAuth. Legacy API-key mode is available only when explicitly enabled with LANDBASE_LEGACY_MODE=1 (or an equivalent truthy value).

auth login

In platform mode, auth login opens the browser OAuth flow. In non-interactive agent contexts, it prints a URL for the user to visit. --force re-authenticates even when a valid platform session exists. For CI and other headless callers, set LANDBASE_S2S_API_KEY=lbk_.... The CLI reads this environment variable and does not persist it.

Legacy API-key login

The --key option and auth set are legacy-mode only:
In default platform mode, auth login --key and auth set fail with an explanatory authentication error. Do not use LANDBASE_API_KEY as a substitute for platform OAuth unless legacy mode is explicitly enabled.

auth status

Prints human-readable authentication status to stderr. It does not print or expose the API key. Platform mode reports the stored session file, device, expiration, and selected account when available. With S2S authentication it reports that LANDBASE_S2S_API_KEY is configured. Legacy mode reports whether the key came from the environment or local config.

auth logout

Platform mode clears the local OAuth session. S2S authentication is managed by removing LANDBASE_S2S_API_KEY from the process or secret manager. Legacy mode clears the locally stored API key; server-side key revocation must be done in account settings.