Repository navigation
Codex Mode Switcher v0.1.0
First public release of a small, dependency-free PowerShell tool for switching Codex between ChatGPT OAuth and one saved custom API provider.
Included
- Status, Init, GPT, DeepSeek and Toggle commands, with NoLogin and SkipDoctor switches.
- GPT selects the OpenAI provider and ChatGPT authentication; the model is left to Codex/account defaults.
- Custom-provider capture and restoration of model, catalog, endpoints, login rule and provider tables, while retaining unrelated MCP, sandbox and project settings.
- Exact pre-change config backups, previous-state backups, atomic writes, state validation and a local writer lock.
- English and Chinese documentation, MIT License, security guidance and Windows CI.
Validation
- 40 Pester regression tests passed with no failures or skips.
- PowerShell syntax parsing and PSScriptAnalyzer 1.25.0 passed locally and in Windows CI (Pester 5.7.1).
- An independent TOML parser confirmed valid output and preservation of unrelated configuration across eight CLI operations.
- Publication files and the full initial Git history were scanned with TruffleHog 3.97.9 with credential verification disabled: zero findings. Additional machine-path/key patterns returned zero matches.
- Original local logs and source notes are excluded from Git history and release assets. Historical validation is summarized in CHANGELOG.md.
Boundaries
Requires PowerShell 7.4+; Windows is the tested platform. DeepSeek restores one previously saved custom provider rather than constructing a new service configuration. Provider/API protocol compatibility depends on the installed Codex version and the endpoint; this release does not claim a fresh live DeepSeek or ChatGPT inference test. Unsupported multiline or quoted managed TOML forms fail before mutation. Project/profile/managed settings may override user-level config, and existing tasks may retain earlier settings. Backups are local, unencrypted and not automatically cleaned up.
The tool does not read or copy the credential store itself; optional Codex login commands delegate authentication to Codex. Keep API keys outside the repository. This is an independent project, unaffiliated with OpenAI or DeepSeek.
Assets
codex-mode.ps1: standalone runtime script.codex-mode-switcher-v0.1.0.zip: tracked source, documentation and tests only.SHA256SUMS.txt: SHA-256 checksums for both assets.