Skip to main content
The CLI reads its settings from flags, environment variables, and a config file. The fastest way to set it up is openlit configure.

Configure once

This writes a KEY=VALUE file to:
  • Linux / macOS - ~/.config/openlit/config.env (honors $XDG_CONFIG_HOME)
  • Windows - %APPDATA%\openlit\config.env
The file is written with mode 0600 (owner-readable only). To inspect the effective configuration without writing anything - including which source each value came from - use --show:

configure flags

Precedence

Settings resolve highest-to-lowest:
  1. CLI flags (--endpoint, --api-key, …)
  2. OPENLIT_* environment variables
  3. OTEL_EXPORTER_OTLP_* environment variables (standard OpenTelemetry fallback)
  4. Config file (~/.config/openlit/config.env, allow-listed keys only)
  5. Built-in defaults
For headless / fleet rollouts, prefer environment variables or flags - they take precedence over the file. Existing OpenTelemetry users can reuse their standard OTEL_EXPORTER_OTLP_* setup.

Environment variables

The OPENLIT_API_KEY value is never promoted into a launched agent’s child-process environment, and the config file is written 0600. The CLI never reads your shell rc files (~/.zshrc, ~/.bashrc) - if you set OPENLIT_* vars in a shell rc, source them before launching the agent.

Content capture modes

OPENLIT_CODING_CONTENT_CAPTURE controls how much of each coding-agent interaction is captured. Tier-1 secret redaction runs on every export regardless of mode.
full is the default so the trace-detail view is useful on first use. Switch to metadata_only when rolling out across a team where prompts may carry confidential material, or minimal if you only need cost and activity rollups.

Endpoint normalization

The CLI accepts scheme-less, http://, or https:// endpoints, with or without a path/trailing slash. For non-loopback hosts it auto-upgrades plain http:// to https://. Loopback and private-range hosts (localhost, 127.0.0.1, ::1, 10.*, 192.168.*, 172.16–31.*, 169.254.*) are left on http://.

Next steps

Command reference

Every command, subcommand, and flag

Wire your coding agents

The end-to-end setup guide