Skip to Content
CLI ReferenceConfiguration

Configuration

The CLI resolves configuration from multiple sources in priority order.

Resolution order

  1. CLI flags--api-key, --api-url
  2. Environment variablesLAUNCHGATE_API_KEY, LAUNCHGATE_API_URL
  3. Config file.launchgaterc in current directory
  4. Config file.launchgaterc in home directory

Higher-priority sources override lower ones.

Environment variables

VariableDescription
LAUNCHGATE_API_KEYYour LaunchGate API key
LAUNCHGATE_API_URLAPI base URL (default: https://api.launchgate.ai)
export LAUNCHGATE_API_KEY=lg_live_your_key_here export LAUNCHGATE_API_URL=https://api.launchgate.ai

Configuration file

Create a .launchgaterc file in your project root or home directory:

.launchgaterc
{ "apiKey": "lg_live_your_key_here", "baseUrl": "https://api.launchgate.ai" }

Both camelCase and snake_case are supported:

.launchgaterc
{ "api_key": "lg_live_your_key_here", "base_url": "https://api.launchgate.ai" }

CI/CD configuration

In CI/CD environments, use environment variables or secret managers:

GitHub Actions

env: LAUNCHGATE_API_KEY: ${{ secrets.LAUNCHGATE_API_KEY }}

Other CI systems

# Set the env var in your CI configuration LAUNCHGATE_API_KEY=lg_live_your_key_here launchgate run my-suite --output "..."
Last updated on