Repository navigation
Releases
v0.2.2 — Installer and Upgrade Recovery
Installation and upgrade fix
v0.2.2 fixes the v0.2.1 delivery failure where updating only ~/.codex/codex-mode.ps1 left the entry point without src/CodexMode.psm1 and every command failed to import the module.
Highlights
- Complete installer:
install.ps1deploys the entry script, cmd adapter, module manifest, completesrc/tree, installer, documentation and an ownership receipt. - Standalone program directory: installs to
%LOCALAPPDATA%\Programs\CodexModeSwitcherby default.CODEX_HOMEis not used as the program directory. - Safe single-file upgrades: a v0.1.0/v0.2.0
codex-mode.ps1is backed up, replaced with a forwarding shim, and restored on uninstall. - Clear repair guidance: missing module files now return
Codex=ModuleMissingwith exact reinstall instructions instead of a rawImport-Moduleexception. - Four lifecycle actions:
Install,Update,VerifyandUninstall, with-DryRun,-Json,-PassThruand staged replacement. - Release integrity: the archive includes
release-manifest.json; CI verifies the complete payload, every SHA-256 and module import, and rejects entry-only delivery.
Install
Download the complete CodexModeSwitcher-0.2.2.zip archive, verify it against SHA256SUMS.txt, extract it, then run:
pwsh -NoProfile -File .\CodexModeSwitcher\install.ps1 -Action Install
& "$env:LOCALAPPDATA\Programs\CodexModeSwitcher\codex-mode.ps1" Diagnose -JsonDo not download only codex-mode.ps1; it depends on the full distribution.
Upgrade from v0.1.0 or v0.2.0
pwsh -NoProfile -File .\CodexModeSwitcher\install.ps1 -Action Install
& "$env:CODEX_HOME\codex-mode.ps1" StatusThe installer backs up the existing entry before installing the forwarding shim. Existing configuration, credentials, sessions, state and backups under CODEX_HOME are not modified.
Verify and uninstall
pwsh -NoProfile -File .\CodexModeSwitcher\install.ps1 -Action Verify
pwsh -NoProfile -File .\CodexModeSwitcher\install.ps1 -Action UninstallUninstall removes program-owned files and shims, restores verified legacy entries, and preserves Codex user data. Optional Terminal/Start Menu/notification integrations remain separate and should be removed with codex-mode integration uninstall-all -Apply.
Validation
- PR #5: merged at
3439265f8a445e628ed2ea80ae6535dda24f87d7. - CI: push run and PR run: 125/125 Pester tests passed, syntax and PSScriptAnalyzer clean, release archive built and verified.
- Architecture verification: passed.
- Installed from the built release archive, verified with
-Action Verify, and uninstalled from the installed copy.
Assets
CodexModeSwitcher-0.2.2.zip— complete installable distribution.SHA256SUMS.txt— SHA-256 for the archive and manifest.release-manifest.json— per-file SHA-256 and size for the installable payload.
Archive SHA-256: fa6d836bed4de1e5b9f02b80f33367ba9021c8ec20cf08b7d554325bf52b9bb5
No GUI, resident service, tray agent, PATH/PSModulePath change or registry-based integration is added. Live Desktop provider end-to-end verification remains a manual acceptance item, unchanged from v0.2.1.
v0.2.1 — Windows Native Integration
Windows Native Integration
v0.2.1 adds optional Windows integrations around the Desktop Controller. It also includes the previously unreleased v0.2.0 controller baseline; no separate v0.2.0 release was published.
Features
- PowerShell module:
Import-Module CodexModeSwitcher,Start-CodexMode GPT/DeepSeek,Get-CodexStatus,Test-CodexEnvironment, and thecodex-modealias. Original script commands remain available. - Windows Terminal: three uniquely identified JSON-fragment profiles: Codex GPT, Codex DeepSeek, Codex Diagnose. Existing
settings.jsonis not rewritten. - Start Menu: optional native shortcuts in a dedicated current-user folder. No desktop shortcuts or context-menu registration.
- Integration management: installation/removal preview by default;
-Applyis explicit approval. Ownership/hash checks, list, uninstall-all, backups and conditional failure recovery preserve unowned or edited files. - Optional toast requests: explicit identity installation and per-command
-Notify; fixed outcome messages only. Notification failure never changes a configuration result. - Desktop baseline: validated Windows identity discovery, safe normal-exit coordination, opt-in launch, native GPT model preservation, transactional backups and conditional recovery. No forced Desktop/task termination.
Install
Download CodexModeSwitcher-0.2.1.zip and verify it against SHA256SUMS.txt. The archive contains the complete CodexModeSwitcher/ module folder. Follow module installation and integration instructions.
Import-Module CodexModeSwitcher
Get-CodexStatus
Start-CodexMode GPT -DryRun
codex-mode install terminal # Preview
codex-mode install terminal -Apply # Explicit approval
codex-mode integration listStart-CodexMode launches by default; -ConfigurationOnly opts out. Legacy codex-mode.ps1 GPT remains configuration-only unless -Launch is supplied. Finish tasks and exit Desktop normally before switching. DeepSeek restores the single saved custom provider, not a built-in provider preset. Keep the full distribution; the entry script now depends on src/.
Validation
- Full local, PR, main and v0.2.1 tag CI: 115/115 Pester tests passed, zero failures/skips; PowerShell syntax and PSScriptAnalyzer passed.
- All 89 prior regressions retained; 26 module/integration cases added.
- Native Windows shortcut serialization and AUMID reads exercised only in isolated temporary folders. Desktop activation and toast submission mocked.
- Architecture CI: source/link checks, light/dark rendering and deterministic repeat passed.
- TruffleHog 3.97.9: zero findings in publishable files and committed history, with live credential verification disabled. Private-path patterns clear.
- Archive/manifest validation and cmd failure exit propagation passed. Archive contains only tracked source, excluding original local logs/config/credentials.
Limits and compatibility
- Actual Terminal profile visibility, Start Menu UI launch, visible toast delivery and live Desktop provider E2E remain unverified. Windows policy/Focus Assist may suppress notifications; observing a Desktop process does not prove provider loading.
- No authentication management, session database access, model gateway, GUI, tray or background service. Implicit CLI login/doctor was removed; legacy NoLogin/SkipDoctor flags remain accepted no-ops.
- No guaranteed hot reload or seamless old-session migration. MSIX launch with custom CODEX_HOME remains conservatively blocked.
- Integration updates are not multi-file crash-atomic. Modified/unowned artifacts are preserved; interrupted updates may require local reconciliation. Backups, receipts and empty directories are retained. Legacy profile shortcuts use their separate uninstaller.
- Uninstall integrations before moving/upgrading the distribution, then reinstall from its new location. External editors remain outside the tool's lock.
MIT License. Independent community project, not an official OpenAI or DeepSeek product.
Uploaded archive SHA-256: 251352ee7ea19754ba01eddd44426c3ab5b9ae820eee4df16ad945cc727a9046. The GitHub-downloaded assets were verified against the merge-commit package.
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.