Skip to content
This repository was archived by the owner on Feb 25, 2026. It is now read-only.

[FGA-47] Add environment variable overrides for cli environment configs#10

Merged
atainter merged 4 commits intomainfrom
at-dockerize
Jul 29, 2024
Merged

[FGA-47] Add environment variable overrides for cli environment configs#10
atainter merged 4 commits intomainfrom
at-dockerize

Conversation

@atainter
Copy link
Copy Markdown
Contributor

@atainter atainter commented Jul 29, 2024

Adds the following environment variable overrides for CLI environment configs.

Environment Variable Description Supported Values
WORKOS_ACTIVE_ENVIRONMENT Sets the selected environment in your .workos.json file. Use headless to override environment configs with other environment variable overrides.
WORKOS_ENVIRONMENTS_HEADLESS_NAME Sets the name of the environment
WORKOS_ENVIRONMENTS_HEADLESS_ENDPOINT Sets the base endpoint for the environment
WORKOS_ENVIRONMENTS_HEADLESS_API_KEY Sets the API key for the environment
WORKOS_ENVIRONMENTS_HEADLESS_TYPE Sets the env type for the environment Production / Sandbox

Developers can use these environment variables to set their active environment or override the existing environment.

Examples

Set the active environment

export WORKOS_ACTIVE_ENVIRONMENT=local

.workos.json

{
  "environments": {
    "local": {
      "endpoint": "http://localhost:8001",
      "apiKey": "<YOUR_KEY>",
      "type": "Sandbox",
      "name": "local"
    }
  }
}

Headless Mode

export WORKOS_ACTIVE_ENVIRONMENT=headless
export WORKOS_ENVIRONMENTS_HEADLESS_NAME=local
export WORKOS_ENVIRONMENTS_HEADLESS_ENDPOINT=http://localhost:8001/
export WORKOS_ENVIRONMENTS_HEADLESS_API_KEY=<YOUR_KEY>
export WORKOS_ENVIRONMENTS_HEADLESS_TYPE=Sandbox

FGA-47

@linear
Copy link
Copy Markdown

linear bot commented Jul 29, 2024

@atainter atainter merged commit 0f089f5 into main Jul 29, 2024
@atainter atainter deleted the at-dockerize branch July 29, 2024 20:01
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants