CLI Authentication
The CLI uses OAuth 2.1 Authorization Code with PKCE.Login
http://127.0.0.1:39123/callback.
If you do not want the CLI to open a browser automatically:
Session state
Check the locally stored session without making an API request:Logout
Clear local credentials:Environment and overrides
BETTER_AUTH_URLchanges the default API originNYLIO_OAUTH_CLI_CLIENT_IDoverrides the OAuth client id--api-base-url <url>overrides the API origin per command
Notes
- Access tokens refresh automatically when a refresh token is available.
- If the stored token is missing or expired without a refresh token, the CLI asks you to log in again.
- The CLI requests the public API audience, not the MCP audience.