OptixLog Docs
CLIConfiguration

Environment Variables

All environment variables recognized by the optixlog CLI — OPTIXLOG_API_KEY, OPTIXLOG_BASE_URL, OPTIXLOG_CONFIG_HOME, and OPTIXLOG_FIXTURE.

The optixlog CLI reads four environment variables. Setting them avoids passing the same flags to every command and is the preferred approach in CI environments.

Variables

Prop

Type

Precedence table

API key

PrioritySource
1 (highest)OPTIXLOG_API_KEY env
2--api-key flag
3Stored profile (~/.optixlog/credentials.toml)
—Error if none found

Base URL

PrioritySource
1 (highest)--base-url flag
2OPTIXLOG_BASE_URL env
3Stored profile
4 (fallback)https://optixlog.leidos.com

Config home

PrioritySource
1 (highest)OPTIXLOG_CONFIG_HOME env
2 (fallback)~/.optixlog/

Fixture

PrioritySource
1 (highest)--fixture flag
2OPTIXLOG_FIXTURE env

When either the flag or the env var is set, the CLI uses the local fixture backend and makes no network requests.

CI usage

In CI, set OPTIXLOG_API_KEY as a secret environment variable and run commands with --no-input:

# GitHub Actions example
- name: Authenticate
  env:
    OPTIXLOG_API_KEY: ${{ secrets.OPTIXLOG_API_KEY }}
  run: optixlog login --no-input

- name: Generate bindings
  env:
    OPTIXLOG_API_KEY: ${{ secrets.OPTIXLOG_API_KEY }}
  run: optixlog generate --check

Offline/test usage

Export OPTIXLOG_FIXTURE once to run the entire workflow offline without repeating --fixture on every command:

export OPTIXLOG_FIXTURE=tests/fixtures/schema.sample.json
optixlog login --api-key sk-opt-test --base-url http://x
optixlog init  --all --output optixlog_gen.py --no-input
optixlog generate

Combine with OPTIXLOG_CONFIG_HOME to avoid touching your real credentials file during tests:

export OPTIXLOG_FIXTURE=tests/fixtures/schema.sample.json
export OPTIXLOG_CONFIG_HOME=/tmp/test-optixlog-home
optixlog login --api-key sk-opt-test --base-url http://x --no-input
optixlog generate

On this page