For the complete documentation index, see llms.txt. This page is also available as Markdown.

Connect OX CLI with OAuth

OAuth provides a streamlined way to authenticate the OX CLI. Instead of creating and configuring an API key, you sign in with your OX account. After you authenticate, the CLI securely stores the authentication tokens and uses them for subsequent commands.

Before you begin

Make sure that:

  • The OX CLI is installed.

  • You have access to an OX organization.

Authenticate with OAuth

  1. Configure the OX API endpoint.

    ox-cli config set api-host https://api.cloud.ox.security
  2. Configure the CLI to use OAuth authentication.

    ox-cli config set api-key oauth

    This configures the CLI to authenticate using OAuth instead of an API key.

  3. Start the OAuth sign-in flow.

    ox-cli login
  4. Complete the authentication process.

    Your default browser opens automatically. Sign in to your OX account and complete the authentication flow.

    After authentication completes successfully, the CLI stores the OAuth tokens locally for future use. You don't need to sign in again until the tokens expire or you sign out.

Sign out

To remove the stored OAuth tokens:

Run:

Last updated