npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

codex-mux

v0.1.0

Published

Unofficial wrapper CLI for using Codex CLI with multiple account profiles

Downloads

8

Readme

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.