Codex account switcher for OpenAI Codex CLI on macOS.
Manage multiple Codex auth.json profiles, switch accounts safely, and launch a menu bar switcher app.
Keywords: codex account switcher, codex auth manager, codex profile switch, openai codex account switch, codex menubar app.
Codex account switching toolkit with:
- CLI (
codex-account-switch) - macOS Menu Bar app (
Codex Account Switch.app)
- Saves current Codex auth as a named profile
- Switches active auth to another saved profile
- Backs up current auth before each switch
- Shows which profile is currently active
- Works with default
~/.codexand customCODEX_HOME
From this repo root:
chmod +x ./codex-account-switchOptional global command:
ln -s "$(pwd)/codex-account-switch" /usr/local/bin/codex-account-switch./codex-account-switch save work
./codex-account-switch save personal
./codex-account-switch list
./codex-account-switch switch personal
./codex-account-switch status
./codex-account-switch rename personal alt
./codex-account-switch delete altBuild the app bundle:
./build-menubar-app.shLaunch it:
open "./dist/Codex Account Switch.app"Or one command build + launch:
./run-menubar.shMenu features:
- Show active profile in menu bar (
Cdx:<name>) - Click a profile to switch (requests quit, then auto reopens after Codex is fully closed)
- Save current auth as a new profile
- Delete saved profiles
- Open profile folder in Finder
Default Codex home: ~/.codex
- Profiles:
~/.codex/account-switch/profiles/*.json - Backups:
~/.codex/account-switch/backups/auth-YYYYmmdd-HHMMSS.json - Active auth:
~/.codex/auth.json
You can override the location with CODEX_HOME:
CODEX_HOME=/path/to/custom/.codex ./codex-account-switch list- Profile names are limited to: letters, numbers,
.,_,- - Auth files are chmod to
600when possible. - This tool copies files only; it does not edit token contents.