Skip to content

Configuration

Swixter stores its own config in a platform-specific directory. AI coder configs use their standard locations.

PlatformPath
Linux/macOS~/.config/swixter/config.json
Windows~/swixter/config.json (e.g., C:\Users\name\swixter\config.json)
CoderPathFormat
Claude Code~/.claude/settings.jsonJSON
Codex~/.codex/config.tomlTOML
Continue.dev~/.continue/config.yamlYAML

A Swixter profile contains:

{
"providerId": "anthropic",
"apiKey": "sk-ant-...",
"baseUrl": "https://api.anthropic.com",
"model": "claude-sonnet-4-6",
"authToken": "",
"envKey": "ANTHROPIC_API_KEY"
}
FieldDescriptionRequired
providerIdWhich provider preset to useYes
apiKeyAPI key for the providerYes
baseUrlOverride the default API endpointNo
modelDefault model nameNo
authToken(Claude only) ANTHROPIC_AUTH_TOKENNo
envKey(Codex only) Environment variable name for API keyNo

Swixter has a two-tier provider system:

Hardcoded in Swixter. Currently includes:

  • anthropic — Anthropic Claude API (wire_api: "responses")
  • ollama — Local Ollama (wire_api: "chat")
  • custom — Generic OpenAI-compatible (wire_api: "chat")

Stored in ~/.config/swixter/providers.json. You can create custom providers:

Terminal window
swixter providers add my-provider --base-url https://api.example.com/v1

User providers can override built-in ones with the same ID.

The wire_api field determines compatibility:

TypeDescriptionCompatible with
chatOpenAI-compatible chat APICodex, Continue.dev
responsesAnthropic Responses APIClaude Code

Codex only supports wire_api: "chat" providers. Anthropic is filtered out in Codex flows.

Profile names must be alphanumeric with dashes/underscores only:

  • Letters, numbers, dashes (-), underscores (_)
  • No spaces or special characters
  • Cannot start with a dash

Valid: my-profile, work_config, test1 Invalid: my profile, -test, hello@world

Each coder has exactly one active profile at a time. Use switch to change it:

Terminal window
swixter claude switch my-profile # sets active
swixter claude apply # writes to coder config

The apply command reads the active profile and writes it to the coder’s native config file. It preserves any non-API settings the coder has (MCP servers, approval policies, etc.).

  • Full replacement of API-related env vars in settings.json
  • Only fields present in the profile are written; undefined fields are removed
  • Writes model environment variables (ANTHROPIC_MODEL, ANTHROPIC_DEFAULT_HAIKU_MODEL, etc.)
  • Supports authToken field
  • Uses environment variable references (env_key) per official Codex spec
  • Creates [model_providers.swixter-<name>] and [profiles.swixter-<name>] tables
  • API keys must be set as environment variables before running Codex (or use swixter codex run)
  • Supports custom env_key per profile
  • Modifies config.yaml with model/apiKey fields
  • Accessed via swixter qwen commands (historical naming)