Light Logo
CLI (v0.56.0)

Environment Variables

Environment variables supported by the WriftAI CLI

WRIFTAI_ACCESS_TOKEN

Purpose: Provides the access token so you can skip the wriftai auth login command.

Default: Not set.

When to Use:

  • Running commands in non-interactive environments.
  • Avoiding repeated logins.

WRIFTAI_API_BASE_URL

Purpose: Defines the base URL for all requests made by the CLI to WriftAI's API.

Default: https://api.wrift.ai/v1

When to Use:

  • Point the CLI to a different API instance.

WRIFTAI_AUTH_BASE_URL

Purpose: Defines the base URL for all requests made by the CLI to WriftAI's Auth Service.

Default: https://wrift.ai

When to Use:

  • Point the CLI to a different Auth instance.

WRIFTAI_SKIP_BROWSER_OPEN

Purpose: Prevents the CLI from automatically opening your web browser during authentication.

Default: When unset, the browser is opened automatically. Setting this variable to any value disables automatic browser opening.

When to Use:

  • Automated or headless environments such as CI.
  • When you want to open the verification URL manually instead of having the CLI open your browser.

WRIFTAI_AUTH_POLL_INTERVAL_BUFFER_MS

Purpose: Overrides the buffer added to the device-authorization poll interval returned by the Auth Service, in milliseconds. This buffer helps avoid "polling too frequently" responses caused by timing variations.

Default: 1000 (1 second).

When to Use:

  • Primarily for development and debugging. This option is intended for internal use and may be removed in a future release.

WRIFTAI_AUTH_RETRY_BASE_DELAY_MS

Purpose: Overrides the base delay, in milliseconds, used for exponential backoff when retrying 5xx server errors from the Auth Service. The delay doubles with each retry, up to a fixed 8-second cap with random jitter,.

Default: 500 (0.5 seconds).

When to Use:

  • Primarily for development and debugging. This option is intended for internal use and may be removed in a future release.

WRIFTAI_MAX_RETRIES

Purpose: Overrides the maximum number of retries on transient errors (429 and 5xx) for requests to both WriftAI's API and its Auth Service. Set to 0 to disable retries. For 429 Too Many Requests, the client waits until the time specified by the server's x-ratelimit-reset header before retrying. For 5xx server errors, the client retries using exponential backoff starting at WRIFTAI_AUTH_RETRY_BASE_DELAY_MS and capped at 8 seconds.

Default: 2.

When to Use:

  • Primarily for development and debugging. This option is intended for internal use and may be removed in a future release.

WRIFTAI_MODEL_REGISTRY_HOST

Purpose: Specifies the host used by the CLI when making requests to WriftAI's Model Registry.

Default: mr.wrift.ai

When to Use:

  • Point the CLI to a different Model Registry instance.

NO_COLOR

Purpose: Disables colored output in the CLI.

Default: Not set (colors enabled when supported).

When to Use:

  • Running the CLI in environments that don’t support ANSI colors.
  • Capturing output for logs, CI systems, or file redirection.
  • Ensuring consistent, plain-text output.

Notes:

  • If set to any value, colored output is disabled.