codex-mux is an unofficial wrapper CLI that lets you use Codex CLI (@openai/codex) with multiple account profiles.
Primary goals:
- Use account A in terminal A and account B in terminal B at the same time
- Avoid repetitive
codex logout->codex loginswitching - Isolate
CODEX_HOMEper profile automatically
- This project is not an official OpenAI product.
- OpenAI and Codex names are trademarks of their respective owners.
- This tool wraps an installed
codexbinary and does not provide account-limit bypass features.
- Node.js + npm
- Codex CLI installed
npm i -g @openai/codexcodex must be available in your PATH for mux login, mux logout, and mux run.
npm install
npm run build
npm linkThen check:
mux --helpCodex CLI uses a single default home (~/.codex). If you switch accounts often, repeated login/logout becomes tedious.
codex-mux isolates profile storage under:
~/.codex-mux/state.json~/.codex-mux/profiles/<profile>/codex-home
Each profile has its own auth.json, so login sessions remain separated.
- Select a profile
mux use a- Login for that profile
mux login- Run Codex with that profile
mux runIn another terminal:
mux use b
mux login
mux runUse two terminals and keep different accounts active.
Terminal 1 (Account A):
mux use a
mux login
mux runTerminal 2 (Account B):
mux use b
mux login
mux runCheck status:
mux current
mux list
mux list --jsonLogout when needed:
mux logout -p a
mux logout -p bIf you prefer explicit profile flags:
mux login -p a
mux run -p a
mux login -p b
mux run -p bSet the active profile for the current terminal session.
Options:
--global: set global default profile instead of session-only--json: JSON output--verbose: debug output
Examples:
mux use a
mux use team-b --globalShow the active profile for this terminal.
Options:
-p, --profile <name>: resolve/show a specific profile--json--verbose
Examples:
mux current
mux current --jsonRun codex login with the selected profile's CODEX_HOME.
Options:
-p, --profile <name>--verbose
Examples:
mux login
mux login -p bRun codex logout with the selected profile's CODEX_HOME.
Options:
-p, --profile <name>--verbose
Examples:
mux logout
mux logout -p aRun codex with the selected profile's CODEX_HOME.
Options:
-p, --profile <name>--verbose
Examples:
mux run
mux run -p b -- --help
mux run -p a chatList registered profiles and login status.
Options:
--json--verbose
Examples:
mux list
mux list --json- Terminal 1:
mux use a->mux run - Terminal 2:
mux use b->mux run
Use mux login/mux logout only when needed.
For Korean documentation, see README.ko.md.