docs/user-manual/en/5-faq/5.1-config-files.md
Default location: ~/.cc-switch/
Customizable location in settings (for cloud sync).
~/.cc-switch/
├── cc-switch.db # SQLite database (SSOT)
├── settings.json # Device-level settings
├── skills/ # Skill SSOT directory
├── skill-backups/ # Skill backups (created on uninstall)
└── db_backup_*.db # Database backups
cc-switch.db is a SQLite database that stores:
| Table | Contents |
|---|---|
| providers | Provider configurations |
| provider_endpoints | Provider endpoint candidate list |
| mcp_servers | MCP server configurations |
| prompts | Prompt presets |
| skills | Skill installation status |
| skill_repos | Skill repository configurations |
| proxy_config | Proxy configuration |
| proxy_request_logs | Proxy request logs |
| provider_health | Provider health status |
| model_pricing | Model pricing |
| settings | App settings |
settings.json stores device-level settings:
{
"language": "zh",
"theme": "system",
"windowBehavior": "minimize",
"autoStart": false,
"claudeConfigDir": null,
"codexConfigDir": null,
"geminiConfigDir": null,
"opencodeConfigDir": null,
"openclawConfigDir": null
}
These settings are not synced across devices.
The backups/ directory stores automatic backups:
Default: ~/.claude/
~/.claude/
├── settings.json # Main configuration file
├── CLAUDE.md # System prompt
└── skills/ # Skills directory
└── ...
{
"env": {
"ANTHROPIC_API_KEY": "sk-xxx",
"ANTHROPIC_BASE_URL": "https://api.anthropic.com"
},
"permissions": {
"allow_file_access": true
}
}
| Field | Description |
|---|---|
env.ANTHROPIC_API_KEY | API key |
env.ANTHROPIC_BASE_URL | API endpoint (optional) |
env.ANTHROPIC_AUTH_TOKEN | Alternative authentication method |
MCP server configuration is in ~/.claude.json:
{
"mcpServers": {
"mcp-fetch": {
"command": "uvx",
"args": ["mcp-server-fetch"]
}
}
}
Default: ~/.codex/
~/.codex/
├── auth.json # Authentication configuration
├── config.toml # Main configuration + MCP
└── AGENTS.md # System prompt
{
"OPENAI_API_KEY": "sk-xxx"
}
# Basic configuration
base_url = "https://api.openai.com/v1"
model = "gpt-4"
# MCP servers
[mcp_servers.mcp-fetch]
command = "uvx"
args = ["mcp-server-fetch"]
Default: ~/.gemini/
~/.gemini/
├── .env # Environment variables (API Key)
├── settings.json # Main configuration + MCP
└── GEMINI.md # System prompt
GEMINI_API_KEY=xxx
GOOGLE_GEMINI_BASE_URL=https://generativelanguage.googleapis.com
GEMINI_MODEL=gemini-pro
{
"mcpServers": {
"mcp-fetch": {
"command": "uvx",
"args": ["mcp-server-fetch"]
}
}
}
| Field | Description |
|---|---|
mcpServers | MCP server configuration |
Default: ~/.opencode/
~/.opencode/
├── config.json # Main configuration file
├── AGENTS.md # System prompt
└── skills/ # Skills directory
└── ...
Default: ~/.openclaw/
~/.openclaw/
├── openclaw.json # Main configuration file (JSON5 format)
├── AGENTS.md # System prompt
└── skills/ # Skills directory
└── ...
OpenClaw uses a JSON5 format configuration file with the following main sections:
{
// Model provider configuration
models: {
mode: "merge",
providers: {
"custom-provider": {
baseUrl: "https://api.example.com/v1",
apiKey: "your-api-key",
api: "openai-completions",
models: [{ id: "model-id", name: "Model Name" }]
}
}
},
// Environment variables
env: {
ANTHROPIC_API_KEY: "sk-..."
},
// Agent default model configuration
agents: {
defaults: {
model: {
primary: "provider/model"
}
}
},
// Tool configuration
tools: {},
// Workspace file configuration
workspace: {}
}
| Field | Description |
|---|---|
models.providers | Provider configuration (mapped to CC Switch's "providers") |
env | Environment variable configuration |
agents.defaults | Agent default model settings |
tools | Tool configuration |
workspace | Workspace file management |
CC Switch's priority when modifying configurations:
settings.jsoncc-switch.db database fileIf you manually edit CLI tool configurations:
CC Switch v3.7.0 migrated from JSON files to SQLite:
It is recommended to regularly export configurations:
The export file includes: