The repository ships ready-to-copy examples under ../examples/.
Start there before you build a config from scratch.
| File | Best for |
|---|---|
../examples/anthropic.toml |
Single-provider Claude setup |
../examples/gemini.toml |
Single-provider Gemini setup |
../examples/multi-provider.toml |
One config with multiple providers and profiles |
model = "claude-sonnet-4-6"
model_provider = "anthropic"
model_reasoning_effort = "medium"
[model_providers.anthropic]
name = "Anthropic"
base_url = "https://api.anthropic.com/v1"
wire_api = "messages"
requires_openai_auth = false
env_http_headers = { "x-api-key" = "ANTHROPIC_API_KEY" }Use profiles when you want a single config to switch across vendors:
model = "claude-opus-4-7"
model_provider = "anthropic"
[model_providers.anthropic]
name = "Anthropic"
base_url = "https://api.anthropic.com/v1"
wire_api = "messages"
requires_openai_auth = false
env_http_headers = { "x-api-key" = "ANTHROPIC_API_KEY" }
[model_providers.gemini]
name = "Google Gemini"
base_url = "https://generativelanguage.googleapis.com/v1beta"
wire_api = "generate_content"
requires_openai_auth = false
env_http_headers = { "x-goog-api-key" = "GEMINI_API_KEY" }
[profiles.opus]
model = "claude-opus-4-7"
model_provider = "anthropic"
[profiles.gemini-pro]
model = "gemini-3.1-pro-preview"
model_provider = "gemini"-
Create the active home directory:
mkdir -p ~/.xli -
Copy the example you want:
cp examples/multi-provider.toml ~/.xli/config.toml -
Export the environment variables referenced by the file.
-
Launch
xlior runxli -p <profile>.
The shipped examples also demonstrate a few high-value settings:
model_reasoning_effortmodel_reasoning_summaryweb_search[profiles.*][otel] metrics_exporter = "none"[tui] theme = "nord"
| Mistake | Fix |
|---|---|
Using env_key for Anthropic or Gemini |
Use env_http_headers instead |
Switching providers with -m alone |
Use profiles, or set both model and model_provider |
Forgetting requires_openai_auth = false |
Add it for provider-native endpoints |
Writing secrets into config.toml |
Keep them in environment variables |
See config.md for the full layering model and authentication.md for auth-specific guidance.