| name | xai_login_instructions |
| description | Use when the user asks how to log in, authenticate, configure OAuth, set up XAI_API_KEY, or fix missing xAI/Grok credentials for codex-xai-oauth. |
xAI Login Instructions
Use xai_login_instructions when the user needs setup commands or auth-file paths.
Default OAuth login writes a shared xAI OIDC entry to ~/.grok/auth.json. This is a shared auth store, not a requirement to use a specific Grok CLI build.
For browser login:
codex-xai-oauth login
For OAuth device login:
codex-xai-oauth login --device
For API-key fallback:
export XAI_API_KEY=xai-...
Credential safety:
- Do not expose token material.
- Prefer
~/.grok/auth.json unless CODEX_XAI_OAUTH_AUTH_FILE is explicitly set.
- Treat
~/.config/codex-xai-oauth/auth.json as a legacy fallback.
- Mention
XAI_API_KEY only as an environment variable name, never as a value.