A lightweight local dashboard for managing Codex model settings, reasoning effort, service tier, and custom OpenAI-compatible API providers from a browser UI.
This project runs locally on your machine and updates your Codex configuration without requiring you to manually edit config.toml.
- Switch Codex models from a local web dashboard
- Change reasoning effort and service tier in real time
- Add and manage custom OpenAI-compatible API providers
- Activate a custom provider through a local proxy
- Automatically create configuration backups before changes
- Restore previous Codex configuration backups
- Mask local user paths in the UI for better privacy
- Keep API credentials local and out of Git
Codex Switcher starts a local Express server and serves a browser-based dashboard at:
http://localhost:3777
The app reads and updates your local Codex files:
C:\Users\XXXXX\.codex\config.toml
C:\Users\XXXXX\.codex\models_cache.json
C:\Users\XXXXX\.codex\auth.json
Custom provider data is stored locally in:
providers.json
providers.jsonis intentionally ignored by Git because it may contain API keys.
- Windows
- Node.js 18 or newer
- npm
- Codex installed and configured locally
Clone the repository:
git clone https://github.com/airplanestar888/Codex-Switcher.git
cd Codex-SwitcherInstall dependencies:
npm installOptional: create a local provider config from the example file:
cp providers.example.json providers.jsonThen edit providers.json or add providers from the web dashboard.
Start the local server:
npm startOr:
node server.jsOpen the dashboard:
http://localhost:3777
On Windows, you can also run:
run swap.bat
The dashboard can read available models from your local Codex model cache and display them in the UI. Selecting a model updates your local Codex configuration.
The app updates values such as:
model = "..."
model_reasoning_effort = "..."
service_tier = "..."You can add custom OpenAI-compatible providers from the dashboard by entering:
- Provider name
- Base URL
- API key
- Model IDs
Example provider format:
{
"providers": [
{
"id": "example-provider",
"name": "Example Provider",
"baseUrl": "https://example.com/v1",
"apiKey": "YOUR_API_KEY_HERE",
"models": [
"example-model"
]
}
],
"activeProviderId": null,
"activeProviderModel": null
}When a custom provider is activated, Codex Switcher routes requests through the local proxy:
http://127.0.0.1:3777/v1
The proxy forwards requests to the selected provider and injects the configured API key locally.
Before modifying your Codex configuration, the app creates a backup in:
C:\Users\XXXXX\.codex\Backup
Only the most recent backups are kept automatically.
You can restore backups directly from the dashboard.
This project is designed to keep sensitive data local.
The following files are ignored by Git:
providers.json
.env
.env.*
node_modules/
Do not commit real API keys, tokens, or personal credentials.
Use providers.example.json as a safe template for sharing provider configuration format.
.
├── public/
│ ├── index.html # Web dashboard
│ └── style.css # Dashboard styles
├── server.js # Express server, API routes, local proxy
├── package.json # npm scripts and dependencies
├── providers.example.json
├── run swap.bat # Windows helper script
└── README.md
npm start
npm run devBoth scripts start the local server.
Make sure the server is running:
npm startThen open:
http://localhost:3777
Make sure Codex has already generated a local model cache at:
C:\Users\XXXXX\.codex\models_cache.json
If no cache exists, the dashboard falls back to a default model display.
Check that:
- The provider Base URL is correct
- The API key is valid
- The selected model ID exists on that provider
- The provider supports OpenAI-compatible chat completions
This repository does not currently include a license file. Add one before distributing or using it in production environments.