Skip to content

mahirozdin/Codex-Multi-Account-Manager

Repository files navigation

Codex Multi-Account Web Switcher

A fast Codex account switcher for Codex App + Codex CLI with a simple web UI.

This project helps you manage multiple personal Codex accounts, switch active accounts, and monitor rate-limit windows from one place.
If you searched for terms like "Codex multi account", "Codex account switcher", "OpenAI Codex rate limit tracker", or "auth.json account manager", this is exactly that use case.

Simple interface preview

Why This Exists

When one account hits usage limits, manually logging out/in is slow and breaks flow.
This tool is built to make multi-account workflows practical:

  • See all added accounts in one dashboard.
  • Track limit windows (5h/weekly) with visual status bars.
  • Activate another account quickly.
  • Import current running account automatically from CODEX_HOME/auth.json.

Key Features

  • Multi-account management for Codex App/CLI.
  • Encrypted vault (AES-256-GCM) for stored auth payloads.
  • Auto import of current account on startup (if auth.json exists).
  • Manual Auto Import Current action for newly switched accounts in Codex App.
  • Account activation (hot-switch flow + runtime-aware behavior).
  • Official-first limit reads via codex app-server with safe fallback behavior.
  • Live event stream for switch/limit updates.
  • Simple UI optimized for quick daily use.

Tech Stack

  • Backend: Node.js, TypeScript, Fastify, WebSocket, Zod
  • Frontend: React, Vite, TanStack Query
  • Shared contracts: @codex-switcher/shared

Installation

Requirements

  • Node.js 22+
  • Codex runtime available on the machine (Codex App and/or Codex CLI)

Setup

npm install
npm start
  • Web UI: http://127.0.0.1:5173
  • Backend API: http://127.0.0.1:3210

If codex is not in PATH, the server tries common install locations automatically (Windows/macOS/Linux).
You can also force a binary path:

CODEX_BINARY=\"C:\\path\\to\\codex.exe\" npm start

Usage

  1. Start the app with npm start.
  2. If you already have an active Codex account, it will be auto-imported on boot.
  3. Add more accounts by:
    • Importing auth.json, or
    • Switching account in Codex App, then clicking Auto Import Current.
  4. Use Activate on a non-active account to switch.
  5. Use Refresh Limits to update all account limit states.

Runtime Diagnostics

Check GET /api/runtime/status for:

  • codexBinaryAvailable
  • codexBinaryPath
  • codexBinarySource
  • codexBinaryChecked

Scripts

npm start      # shared build + web dev + server dev
npm run build  # build all packages
npm run test   # run server and web tests
npm run lint   # TypeScript checks

Security Notes

  • Secrets are never stored as plaintext outside the encrypted vault.
  • Vault key is stored in OS keychain (keytar).
  • Auth payloads are validated before being persisted.
  • Logs avoid exposing secret fields.

Tested Environment

  • Tested and working on Windows 11.
  • Verified with Codex App latest available build at test time (March 31, 2026).
  • Not yet tested on macOS or Linux.

If you use macOS/Linux and can validate behavior, please open an issue or PR so we can document compatibility quickly.

Issues and Support

If you find a bug, please open an issue with:

  • OS and version
  • Codex App/CLI version
  • Steps to reproduce
  • Expected vs actual behavior

Contributing

Contributions are welcome from everyone.

This project is intentionally community-driven. I started it to solve a real workflow pain, and I want to build it together with others who use Codex daily.
Feature ideas, bug fixes, UX improvements, docs updates, and platform compatibility work (macOS/Linux) are all welcome.

Project Structure

apps/
  server/    Fastify API + vault + switch/limit services
  web/       React UI
packages/
  shared/    shared zod schemas and types

License

MIT

About

Multi-account switcher for Codex App + Codex CLI with a clean web UI: manage accounts, auto-import current auth.json, monitor 5h/weekly limit windows, and activate the right account in seconds.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors