Skip to content

eggmun98/codex-mux

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

codex-mux

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 login switching
  • Isolate CODEX_HOME per profile automatically

Important Notice (Unofficial)

  • This project is not an official OpenAI product.
  • OpenAI and Codex names are trademarks of their respective owners.
  • This tool wraps an installed codex binary and does not provide account-limit bypass features.

Prerequisites

  • Node.js + npm
  • Codex CLI installed
npm i -g @openai/codex

codex must be available in your PATH for mux login, mux logout, and mux run.

Install (Local Development)

npm install
npm run build
npm link

Then check:

mux --help

Why This Exists

Codex 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.

Quick Start

  1. Select a profile
mux use a
  1. Login for that profile
mux login
  1. Run Codex with that profile
mux run

In another terminal:

mux use b
mux login
mux run

A/B Account Example

Use two terminals and keep different accounts active.

Terminal 1 (Account A):

mux use a
mux login
mux run

Terminal 2 (Account B):

mux use b
mux login
mux run

Check status:

mux current
mux list
mux list --json

Logout when needed:

mux logout -p a
mux logout -p b

If you prefer explicit profile flags:

mux login -p a
mux run -p a
mux login -p b
mux run -p b

Commands

mux use <profile>

Set 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 --global

mux current

Show the active profile for this terminal.

Options:

  • -p, --profile <name>: resolve/show a specific profile
  • --json
  • --verbose

Examples:

mux current
mux current --json

mux login [codexArgs...]

Run codex login with the selected profile's CODEX_HOME.

Options:

  • -p, --profile <name>
  • --verbose

Examples:

mux login
mux login -p b

mux logout [codexArgs...]

Run codex logout with the selected profile's CODEX_HOME.

Options:

  • -p, --profile <name>
  • --verbose

Examples:

mux logout
mux logout -p a

mux run [codexArgs...]

Run 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 chat

mux list

List registered profiles and login status.

Options:

  • --json
  • --verbose

Examples:

mux list
mux list --json

Recommended Usage Pattern

  • Terminal 1: mux use a -> mux run
  • Terminal 2: mux use b -> mux run

Use mux login/mux logout only when needed.

Korean README

For Korean documentation, see README.ko.md.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors