codex-account-switcher
v0.1.3
Published
Switch between multiple Codex CLI auth accounts with cdx switch
Downloads
418
Maintainers
Readme
cdx (Codex Account Switcher)
Switch between Codex CLI accounts quickly with:
cdx switchInstall
npm i -g codex-account-switcheror
bun add -g codex-account-switcherCommands installed:
cdxcxs(alias ofcdx)
Before Setup
Make sure Codex stores auth in a file (auth.json):
codex -c 'cli_auth_credentials_store="file"' loginQuick Setup
- Login to account A and save it:
codex login
cdx save personal- Login to account B and save it:
codex logout
codex login
cdx save work- Switch:
cdx switchUsage
cdx list
cdx current
cdx use work
cdx rename work main
cdx switch
cdx swap 1 2
cdx remove workHow It Works
cdx copies the selected account auth file into:
~/.codex/auth.json(or$CODEX_HOME/auth.json)
State is stored in:
~/.cdx/accounts.json~/.cdx/active~/.cdx/auth/*.auth.json(created bycdx save)
