@holic512/plugin-codex-switch
v1.0.6
Published
Codex config switcher with interactive menu and Ink views
Downloads
591
Maintainers
Readme
@holic512/plugin-codex-switch
Codex 配置切换插件,提供:
- Codex 配置自动发现
- models 拉取(优先远端 + 缓存回退)
- model/mode/provider 切换(自动备份 + 原子写入)
- Codex 缓存清理(仅缓存目录)
- 交互菜单(prompts)+ 清屏式 CLI 仪表盘输出
安装
slothtool install @holic512/plugin-codex-switch命令
codex-switch -i
codex-switch current [--json]
codex-switch modes [--refresh] [--json]
codex-switch use
codex-switch use --mode <mode> --model <model> [--provider <id>] [--yes] [--json]
codex-switch backup list [--json]
codex-switch rollback [--id <backupId>] [--yes] [--json]
codex-switch clean cache [--dry-run] [--sessions-days <n>] [--yes] [--json]
codex-switch edit-config [--url <baseUrl>] [--key <apiKey>] [--yes] [--json]配置发现顺序
$CODEX_HOME/config.toml- Windows:
%USERPROFILE%/.codex/config.toml - macOS/Linux:
~/.codex/config.toml ~/.config/codex/config.toml
缓存与备份
- 插件配置:
~/.slothtool/plugin-configs/codex-switch.json - API 缓存:
~/.slothtool/plugin-configs/codex-switch.cache.json - 备份目录:
~/.slothtool/plugin-configs/codex-switch.backups/
注意事项
- 使用
@iarna/toml写回配置,会尽量保持字段,但不保证保留原注释与原格式顺序。 - 缓存清理仅处理:
tmp、shell_snapshots,以及超期sessions子项。 - 不会删除
config.toml、auth.json、rules/。
