Modules§
Macros§
- t
- Get localized text based on current language
Structs§
- AppSettings
- 应用设置结构,允许覆盖默认配置目录
- AppState
- 全局应用状态
- Auth
Service - Config
Service - 配置导入导出相关业务逻辑
- Database
- 数据库连接封装
- Deep
Link Import Request - Deep link import request model.
- Endpoint
Latency - 端点测速结果
- Extra
Usage - Failover
Queue Item - 故障转移队列条目(简化版,用于前端展示)
- Managed
Auth Account - Managed
Auth Device Code Response - Managed
Auth Status - McpApps
- MCP 服务器应用状态(标记应用到哪些客户端)
- McpLive
Drift Entry - McpLive
Drift Report - McpServer
- MCP 服务器定义(v3.7.0 统一结构)
- McpService
- MCP 相关业务逻辑(v3.7.0 统一结构)
- Multi
AppConfig - 多应用配置结构(向后兼容)
- Prompt
Service - Provider
- 供应商结构体
- Provider
Meta - 供应商元数据
- Provider
Service - 供应商相关业务逻辑
- Proxy
Config - 代理服务器配置
- Proxy
Server Info - 代理服务器信息
- Proxy
Service - Proxy
Status - 代理服务器状态
- Quota
Tier - Skill
Service - Speedtest
Service - 网络测速相关业务
- Stream
Check Config - 流式检查配置
- Stream
Check Result - 流式检查结果
- Stream
Check Service - 流式健康检查服务
- Subscription
Quota - WebDav
Sync Service - WebDav
Sync Settings - WebDav
Sync Status - WebDav
Sync Summary
Enums§
Functions§
- check_
legacy_ config_ dir_ migration_ needed - 检查是否存在尚未迁移的旧版配置目录。
- codex_
config_ text_ from_ settings - export_
config_ to_ file - Export the SQLite database to a CC Switch compatible SQL file.
- get_
app_ config_ dir - 获取应用配置目录路径(默认 $HOME/.cc-switch-tui)
- get_
claude_ mcp_ path - 获取 Claude MCP 配置文件路径,若设置了目录覆盖则与覆盖目录同级
- get_
claude_ settings_ path - 获取 Claude Code 主配置文件路径
- get_
codex_ auth_ path - 获取 Codex auth.json 路径
- get_
codex_ config_ path - 获取 Codex config.toml 路径
- get_
enable_ claude_ plugin_ integration - get_
skip_ claude_ onboarding - get_
webdav_ sync_ settings - import_
from_ claude - 从 ~/.claude.json 导入 mcpServers 到统一结构(v3.7.0+) 已存在的服务器将启用 Claude 应用,不覆盖其他字段和应用状态
- import_
from_ codex - 从 ~/.codex/config.toml 导入 MCP 到统一结构(v3.7.0+)
- import_
from_ gemini - 从 ~/.gemini/settings.json 导入 mcpServers 到统一结构(v3.7.0+) 已存在的服务器将启用 Gemini 应用,不覆盖其他字段和应用状态
- import_
provider_ from_ deeplink - Import a provider from a deep link request.
- legacy_
config_ migration_ paths - 返回待迁移的旧配置目录和当前配置目录。
- migrate_
legacy_ config_ dir_ if_ needed - 首次运行时自动将旧版 ~/.cc-switch/ 迁移到 ~/.cc-switch-tui/
- parse_
deeplink_ url - Parse a
ccswitch://URL into aDeepLinkImportRequest. - read_
codex_ live_ mcp_ servers_ map - Read Codex live MCP servers from ~/.codex/config.toml as normalized cc-switch specs.
- read_
json_ file - 读取 JSON 配置文件
- remove_
server_ from_ claude - 从 Claude live 配置中移除单个 MCP 服务器
- remove_
server_ from_ codex - 从 Codex live 配置中移除单个 MCP 服务器 从正确的 [mcp_servers] 表中删除,同时清理可能存在于错误位置 [mcp.servers] 的数据
- remove_
server_ from_ gemini - 从 Gemini live 配置中移除单个 MCP 服务器
- set_
enable_ claude_ plugin_ integration - set_
skip_ claude_ onboarding - set_
webdav_ sync_ settings - skip_
legacy_ config_ dir_ migration - 用户拒绝迁移:写入标记文件以永不再次提示。
- sync_
claude_ plugin_ on_ provider_ switch - sync_
claude_ plugin_ on_ settings_ toggle - sync_
enabled_ to_ claude - 将 config.json 中 enabled==true 的项投影写入 ~/.claude.json
- sync_
enabled_ to_ codex - 将 config.json 中 Codex 的 enabled==true 项以 TOML 形式写入 ~/.codex/config.toml
- sync_
enabled_ to_ gemini - 将 config.json 中 enabled==true 的项投影写入 ~/.gemini/settings.json
- sync_
single_ server_ to_ claude - 将单个 MCP 服务器同步到 Claude live 配置
- sync_
single_ server_ to_ codex - 将单个 MCP 服务器同步到 Codex live 配置 始终使用 Codex 官方格式 [mcp_servers],并清理可能存在的错误格式 [mcp.servers]
- sync_
single_ server_ to_ gemini - 将单个 MCP 服务器同步到 Gemini live 配置
- update_
settings - update_
webdav_ sync_ status - webdav_
jianguoyun_ preset - write_
codex_ live_ atomic - 原子写 Codex 的
auth.json与config.toml,在第二步失败时回滚第一步