Skip to main content
The CLI reads settings from three places, in priority order:
  1. Environment variables (highest priority — great for CI)
  2. config.toml (persistent settings via buildwithtrace config set)
  3. Built-in defaults

buildwithtrace config

buildwithtrace config list prints every stored setting plus the effective environment and backend URL.

Config keys

Environments

The env setting selects the backend. production is correct for everyone except Trace developers.

Environment variables

The Python (buildwithtrace-sdk) and Node (@buildwithtrace/sdk) SDKs read the same TRACE_API_TOKEN / TRACE_API_KEY for auth and TRACE_ENV for the backend environment, so a machine already set up for the CLI works for the SDKs with no extra configuration. See SDKs.

Files on disk

Config and credentials live in the platform config directory (override with TRACE_CONFIG_DIR):
Typical locations:
  • macOS~/Library/Application Support/trace/
  • Linux~/.config/trace/
  • Windows%APPDATA%\buildwithtrace\trace\
Run buildwithtrace config list if you’re unsure — it reports the effective paths and values.

Credential storage

Auth tokens and BYOK keys are stored in your OS keychain under the service name com.buildwithtrace.cli:
  • macOS — Keychain
  • Windows — Credential Manager
  • Linux — Secret Service (GNOME Keyring / KWallet)
If no keychain is available (common on headless servers), the CLI falls back to credentials.json with 0600 permissions. Secrets are never written to the plaintext config.toml.

Analytics

The CLI (and the SDKs) send anonymous, privacy-first usage analytics to PostHog to help improve the product. Every event is tagged with the client (cli / sdk-python / sdk-node). What’s collected: command/method names, durations, exit codes, and version/OS info only. A hard PII scrub drops anything that isn’t a short enum / number / boolean, so file contents, file paths, net or component names, and your prompts are never sent. Auto-disabled when: you’re in CI, you’ve opted out, or it’s a source install with no analytics key baked in (those never phone home). Disable it entirely with either:
Analytics are fire-and-forget and never block or fail a command.