- Environment variables (highest priority — great for CI)
config.toml(persistent settings viabuildwithtrace config set)- Built-in defaults
buildwithtrace config
buildwithtrace config list prints every stored setting plus the effective environment and backend URL.
Config keys
| Key | Values | Default | Description |
|---|---|---|---|
env | production, staging, local | production | Which Trace backend to talk to |
backend | (alias for env) | — | Friendly alias; config set backend staging == config set env staging |
api_version | latest, v4, v3 | latest | API version prefix. latest resolves server-side to the newest backend API (freshest agent tools + prompt); pin v4/v3 only for stability |
output.format | text, json | text | Default output format |
llm.provider | trace, anthropic, openai, gemini | trace | Active model provider (see BYOK) |
llm.model | provider model ID | — | Model to use with a BYOK provider |
Environments
Theenv setting selects the backend. production is correct for everyone except Trace developers.
| Environment | Backend URL |
|---|---|
production | https://api.buildwithtrace.com |
staging | Trace internal staging |
local | http://localhost:8000 |
Environment variables
| Variable | Description |
|---|---|
TRACE_API_TOKEN | Auth token; used automatically when set (CI/headless). Accepts a trace_pat_... PAT or a session JWT |
TRACE_API_KEY | Token alias read by the SDKs (TRACE_API_TOKEN is also accepted by the Python SDK) |
TRACE_ENV | Override the CLI backend environment (production/staging/local) |
TRACE_BASE_URL | Override the API base URL directly (used by the SDKs; the CLI uses TRACE_ENV) |
TRACE_FRONTEND_URL | Override the login-page origin used by the browser deeplink login |
TRACE_API_VERSION | Override the API version (latest (default) / v4 / v3) |
TRACE_CONFIG_DIR | Override the config/credentials directory |
TRACE_OUTPUT_FORMAT | Set to json to force JSON output |
TRACE_JSON | Backing env var for the global --json flag |
TRACE_NO_INTERACTIVE | Disable prompts (also implied by CI) |
CI | When set, enables JSON output + non-interactive mode, and auto-disables analytics + the update check |
TRACE_NO_ANALYTICS | Disable PostHog usage analytics |
DO_NOT_TRACK | Cross-tool standard — also disables analytics |
TRACE_NO_UPDATE_CHECK | Set to 1 to disable the “new version available” notice |
TRACE_NO_REPORTS | Disable automatic error/generation-failure reports |
TRACE_ENGINE_PATH | Use a specific engine binary for ERC/DRC/export |
POSTHOG_API_KEY / POSTHOG_HOST | Override analytics destination |
HTTP_PROXY / HTTPS_PROXY | Standard proxy support (checked by buildwithtrace doctor) |
VISUAL / EDITOR | Editor used by buildwithtrace rules edit and inline editing |
TRACE_LLM_PROVIDER / TRACE_LLM_API_KEY / TRACE_LLM_MODEL | BYOK routing for the SDKs (set once via env). See BYOK |
ANTHROPIC_API_KEY | BYOK key for Anthropic (read by the CLI’s byok) |
OPENAI_API_KEY | BYOK key for OpenAI |
GEMINI_API_KEY / GOOGLE_API_KEY | BYOK key for Gemini |
KICAD_SYMBOL_DIR / KICAD_FOOTPRINT_DIR | Extra library search paths for local conversion |
ALTIUM_PREFERRED_VERSION | Pin a specific Altium Designer version for the bridge |
Files on disk
Config and credentials live in the platform config directory (override withTRACE_CONFIG_DIR):
- macOS —
~/Library/Application Support/trace/ - Linux —
~/.config/trace/ - Windows —
%APPDATA%\buildwithtrace\trace\
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 namecom.buildwithtrace.cli:
- macOS — Keychain
- Windows — Credential Manager
- Linux — Secret Service (GNOME Keyring / KWallet)
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:

