An open-source all-in-one desktop manager for OpenAI Codex.
Switch provider profiles in one click, manage your ChatGPT accounts, and centrally manage MCP servers, plugins, and Skills.
中文 · Latest release · Changelog · Issues
CGswitch is built for developers who use OpenAI Codex and works with the local Codex environment on their computer. It brings provider profiles, ChatGPT OAuth accounts, MCP servers, plugins, and Skills into one desktop app, reducing the need to move between configuration files and separate tools.
Provider preset or existing Codex configuration
↓
Saved as a profile
↓
Edit · test · apply · restore
CGswitch backs up relevant Codex files before applying a profile. Provider profiles stay separate from global MCP, Plugins, and Skills, so switching providers does not require reconfiguring those resources.
- Start from a built-in provider preset, capture the current
~/.codex/config.toml, or create a custom provider. - Edit
config.toml,models.json, andauth.jsonwith TOML/JSON validation. - Fetch available models from a provider's
/modelsendpoint and select them in the profile editor. - Rename, duplicate, reorder, delete, and apply profiles.
- Keep unrelated Codex configuration such as MCP and plugin sections when applying provider-specific changes where possible.
- Set a custom display name, provider icon, administration URL, and optional ChatGPT account binding.
The current built-in presets are ChatGPT, DeepSeek, MiniMax, Zhipu, OpenCode, OpenRouter, Xiaomi MiMo, Kimi, Qwen, Tencent Hunyuan, Volcengine Doubao, Baidu Qianfan, xAI (Grok), and Custom.
Custom providers can use the Responses API-compatible configuration supported by Codex, with their own endpoint, API key, and model catalog.
- Sign in to ChatGPT in the system browser via OAuth.
- Manage multiple accounts, choose a default account, and bind an account to a provider profile.
- Test ChatGPT authentication and inspect quota information when available.
- Test third-party provider connectivity, including response status and latency.
- View provider balance or usage indicators for supported providers; ChatGPT quota is handled separately.
- Manage the global
[mcp_servers.*]configuration in~/.codex/config.toml. - Configure local
STDIOservers and remoteHTTP/ Streamable HTTP servers. - Edit commands, arguments, URLs, bearer-token environment variables, headers, environment variables, and timeouts.
- Test server connectivity and inspect the tools a server provides; probes go through the system proxy.
- Switch between a structured form and TOML source editing with validation and formatting.
- Compare the live Codex configuration with CGswitch's database mirror before syncing either direction.
- List installed Codex plugins and inspect their versions, capabilities, contents, source, and install path.
- Browse bundled and external plugin marketplaces.
- Install states in marketplace catalogs stay consistent with the Codex desktop app — plugins installed here are recognized there directly.
- Installed plugins are listed first in marketplace catalogs; search matches plugin names only via Ctrl/Cmd+K.
- Installing a plugin that requires sign-in prompts you to authorize it in the Codex desktop app.
- Add marketplaces from GitHub shorthand, Git, SSH, or a local marketplace directory.
- Preview and install a plugin from a GitHub repository, optionally using a branch or subdirectory.
- Check and upgrade third-party marketplace plugins, or uninstall plugins through the Codex CLI.
- Import local Skills, preview their
SKILL.md, detect updates and conflicts, and enable, disable, or delete managed Skills. - Scan Skills from
~/.codex/skillsand~/.agents/skillswhile keeping the CGswitch Skill registry separate from plugin-contained Skills.
- Windows and macOS desktop builds powered by Tauri 2.
- Light, dark, and system theme modes.
- English and Simplified Chinese interface languages, with system-language detection.
- Optional launch at login, silent start, and minimize-to-tray behavior.
- System tray menu with quick actions: switch profiles, open settings, jump to accounts, and show the main window. Single-click on the tray icon can be set to either show the main window or open the tray menu.
- Optional Codex restart after applying a profile.
- Optional automatic update checks with release notes before installation, with an "updated to vX" notification on the next launch.
- Local backups of the database, configuration files, and Codex files are created automatically; database backups can be browsed and restored from Settings.
The settings page is organized into four tabs:
- General — theme, language, launch-at-login, silent start, and minimize-to-tray.
- Application — single-click tray action, restart Codex after switching, and automatic update checks.
- Advanced — database backup management with immediate backup, import/export, auto-backup (frequency and retention), and collapsible backup records.
- About — application info card with version, GitHub / changelog links, and the data-path list.
When the live Codex config.toml and CGswitch's MCP mirror drift apart, MCP opens a dedicated diff page that lists every divergent server with a red/green LCS diff and supports batch or single-row adopt / revert actions.
Download the latest build from the GitHub Releases page.
| Platform | Recommended asset | Notes |
|---|---|---|
| Windows x64 | CGswitch-v{VERSION}-Windows-setup.exe |
Standard installer. |
| Windows x64 | CGswitch-v{VERSION}-Windows.msi |
Useful for deployment or MSI-based installation. |
| macOS Apple Silicon | CGswitch-v{VERSION}-macOS-arm64.dmg |
For Apple Silicon Macs. |
| macOS Intel | CGswitch-v{VERSION}-macOS-x64.dmg |
For Intel Macs. |
Open the DMG, drag CGswitch to Applications, and launch it. If macOS blocks the app, first allow it in System Settings → Privacy & Security. If it still reports that the app cannot be opened, run:
xattr -cr /Applications/CGswitch.appReplace the path if you installed the app somewhere else. Official packages are currently published for Windows and macOS; Linux packages are not included.
- Open Providers, add a built-in preset or Custom, enter the credentials or bind a ChatGPT account, then apply.
- Enable the optional Codex restart behavior in Settings → Application if you want CGswitch to restart Codex after applying a profile.
- Use MCP, Plugins, or Skill in the sidebar to manage the corresponding global Codex resources.
CGswitch keeps its application data under the current user's home directory. The exact files and folders depend on which features have been used:
~/.cgswitch/
├── settings.json
├── cgswitch.db
├── balance-cache.json
├── logs/
│ └── cgswitch.log
├── update-marker
└── backups/
├── config/
├── database/
└── codex-files/
CGswitch keeps its run logs under ~/.cgswitch/logs/ (1MB × 10 rotation).
The live Codex files remain under ~/.codex:
~/.codex/
├── config.toml
├── models.json
├── auth.json
├── plugins/
└── skills/
API keys, OAuth credentials, profiles, and backups are local data. CGswitch creates backups before relevant configuration writes, but you should still avoid committing or sharing .cgswitch, auth.json, API keys, or backup files.
CGswitch backs up the relevant files, updates the provider-related Codex configuration, and preserves unrelated configuration areas where possible. Whether Codex restarts afterward is controlled by Settings → Application.
No. Profiles describe model/provider settings; MCP describes tool servers; Plugins are Codex extension packages; Skills are reusable instruction directories. They are managed in separate areas of the application.
A model provider configuration does not guarantee that every App or MCP connector plugin can load. Some connector plugins also require compatible official ChatGPT authentication or their own dependencies. Check the plugin's requirements if its package is installed but a connector is unavailable.
For a third-party provider, check the endpoint and API key first. For the official ChatGPT profile, sign in through the account settings and make sure the selected account is still valid.
If the problem persists, search existing Issues or open a new report with the platform, CGswitch version, and a redacted error message. Do not include API keys or authentication files.
- Node.js
- pnpm
11.9.0 - Rust toolchain pinned by
src-tauri/rust-toolchain.toml - The platform prerequisites required by Tauri 2
pnpm install
pnpm dev:tauripnpm dev:tauri starts the Vite frontend and a real Tauri desktop window. For frontend-only browser development, use:
pnpm devpnpm typecheck
pnpm test:unit
pnpm check
pnpm build
pnpm build:debugpnpm check runs the frontend and Rust quality checks. pnpm build creates the web build; pnpm build:debug creates a debug Tauri bundle. To package release installers locally:
pnpm tauri buildRelease bundles are written under src-tauri/target/release/bundle/.
CGswitch is built with Tauri 2 + Rust for native file access and Codex integration, with a React frontend and a local SQLite database.
The main source areas:
src/
├── main.tsx React entry point
├── style.css global tokens, layout conventions, and styles
├── presets.ts built-in provider display metadata
├── icons.ts bundled provider icon registry
├── types.ts shared TypeScript types
├── utils.ts shared frontend utilities
├── api/ typed IPC methods and browser mock
├── app/ shell, navigation, state, polling, and management data cache
├── assets/ bundled provider icons and resources
├── components/ shared UI components (AppDialog, AppSelect, ConfigTextEditor, …)
├── features/ profiles, mcp, plugins, skills, settings, updates
└── i18n/ English and Simplified Chinese messages
src-tauri/src/
├── main.rs executable entry point
├── lib.rs Tauri runtime, command registration, and plugin setup
├── commands.rs Tauri command boundary
├── error.rs typed application errors
├── fsutil.rs filesystem helpers (atomic write, …)
├── services/ AppContext and use cases (profiles, mcp, plugins, accounts, …)
├── codex/ Codex config files and process management
├── auth/ OAuth and account authentication
├── database.rs SQLite connection, schema, and migrations
├── models.rs Rust domain models and command DTOs
├── builtin.rs built-in provider assets and templates
└── paths.rs filesystem path helpers
Bug reports, feature ideas, documentation improvements, and pull requests are welcome. For code changes, run the relevant checks above and keep credentials, local databases, and generated bundles out of commits.
CGswitch is released under the MIT License. Some provider icons (ChatGPT, DeepSeek, MiniMax, OpenCode, Qwen, xAI, Zhipu) are sourced from thesvg.org; the rest are in-house or sourced separately. Each SVG keeps its own source notice.