A beautiful web UI for managing and switching Codex API provider configurations.
- πͺ Windows/WSL Sync: Optional toggle keeps Windows and WSL configs in sync when switching
- π¨ Modern Interface: Beautiful, intuitive web UI with glass-morphism design
- π Secure Storage: Keys stored safely in
~/.cx-switch/(not affected by npm updates) - π Key Masking: Sensitive information hidden by default with toggle visibility
- π Multi-language: Support for English, δΈζ, and EspaΓ±ol
- β‘ Fast Switching: One-click switching between providers
- π¦ Easy Management: Add, edit, and delete configurations effortlessly
- π Export: Export to
~/.codexdirectory or clipboard - π― Project Trust: Manage project-specific trust levels
- π Quick Start: Simple CLI command to launch
npm install -g cx-switch
npx cx-switch
git clone https://github.com/mahaoyang/cx-switch.git
cd cx-switch
npm install
npm run devAfter installation, simply run:
cx-switch
# or use the shorter command
cxThis will:
- Start the local server on port 3000
- Automatically open your browser
- You can start managing your Codex configurations!
- Click "Add New" button
- Fill in your API details:
- API Base URL: e.g.,
https://api.openai.com/v1 - API Key: Your OpenAI API key (sk-...)
- Model: e.g.,
gpt-5.1-codex-max,claude-3-opus - Reasoning Effort: low, medium, high, or xhigh (optional)
- API Base URL: e.g.,
- Configure advanced options (optional):
- Custom provider settings
- Additional auth fields
- Project trust levels
- Click "Save"
- Select a provider from the left sidebar
- Click "Switch to this provider" button
- The active provider will be marked with "Current"
Switching automatically writes auth.json and config.toml into your ~/.codex directory under the current user. When running on Windows or inside WSL, a tooltip-enabled toggle appears next to the button so you can also sync the other side (Windows β WSL) in one go.
Go to the "Export Configuration" tab and choose:
- Export to ~/.codex directory: Directly writes files to your Codex directory
- Copy auth.json: Copies auth.json content to clipboard
- Copy config.toml: Copies config.toml content to clipboard
Your configurations are stored in ~/.cx-switch/:
~/.cx-switch/
βββ providers.json # Your provider configurations
βββ active-provider.json # Currently active provider
βββ global-config.json # Global settings
Important Notes:
- β This directory is separate from the npm package
- β Your data is safe during npm updates
- β API keys stored locally, never sent to any server
- π¦ You can backup this directory to preserve your configurations
{
"OPENAI_API_KEY": "sk-your-api-key-here"
}model = "gpt-5.1-codex-max" model_reasoning_effort = "xhigh" # Custom provider configuration model_provider = "azure" [model_providers.azure] base_url = "https://your-resource.openai.azure.com/v1" wire_api = "responses" requires_openai_auth = true # Project trust levels [projects."/home/user/workspace/my-project"] trust_level = "trusted"
- Vue 3: Progressive JavaScript framework
- Vite: Next generation frontend tooling
- Tailwind CSS 4: Utility-first CSS framework
- Lucide Icons: Beautiful icon set
- vue-i18n: Internationalization
# Install dependencies npm install # Start development server npm run dev # Build for production npm run build # Run CLI locally npm start
- Modern browsers (Chrome, Firefox, Safari, Edge)
- File System Access API support (for directory export)
- Clipboard API support (for copy functions)
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License