{"id":18231,"library":"codex-multi-auth","title":"codex-multi-auth","description":"Multi-account OAuth manager and auth wrapper for the official OpenAI Codex CLI (v1.3.2, stable). Provides account switching, health-aware failover, proactive token refresh, and diagnostics (forecast, report, fix, doctor). Ships TypeScript types, ESM-only, requires Node >=18.0.0 and TypeScript ^5 as peer dependency. Differentiates from raw @openai/codex by adding multi-account pool management, circuit-breaker logic, and recovery tools without altering the core CLI interface. Maintained actively with frequent patches.","status":"active","version":"1.3.2","language":"javascript","source_language":"en","source_url":"https://github.com/ndycode/codex-multi-auth","tags":["javascript","openai","codex","codex-cli","chatgpt","oauth2","pkce","multi-account","account-switching","typescript"],"install":[{"cmd":"npm install codex-multi-auth","lang":"bash","label":"npm"},{"cmd":"yarn add codex-multi-auth","lang":"bash","label":"yarn"},{"cmd":"pnpm add codex-multi-auth","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency for type declarations","package":"typescript","optional":true}],"imports":[{"note":"ESM-only; CJS require will fail.","wrong":"const codexMultiAuth = require('codex-multi-auth')","symbol":"default","correct":"import codexMultiAuth from 'codex-multi-auth'"},{"note":"Named export; no subpath needed.","wrong":"import { AuthManager } from 'codex-multi-auth/dist'","symbol":"AuthManager","correct":"import { AuthManager } from 'codex-multi-auth'"},{"note":"Account is a type-only export; use import type to avoid runtime error.","wrong":"import { Account } from 'codex-multi-auth'","symbol":"Account","correct":"import type { Account } from 'codex-multi-auth'"}],"quickstart":{"code":"npm i -g @openai/codex\nnpm i -g codex-multi-auth\ncodex auth login\ncodex auth status\ncodex auth list\ncodex auth switch 2\ncodex auth forecast --live","lang":"typescript","description":"Install globally, log in, verify status, list accounts, switch account, and preview routing decision."},"warnings":[{"fix":"npm uninstall -g @ndycode/codex-multi-auth && npm i -g codex-multi-auth","message":"Legacy scoped package @ndycode/codex-multi-auth is migration-only; new installs must use codex-multi-auth.","severity":"breaking","affected_versions":"<1.0.0"},{"fix":"Use import statements and set 'type': 'module' in package.json.","message":"CJS require() will fail in v1.3+; project is ESM-only.","severity":"deprecated","affected_versions":">=1.3.0"},{"fix":"Upgrade to v1.3.2.","message":"Interactive Codex runs after GPT-5.5 rollout broke in v1.3.1; fixed in v1.3.2 by preserving TTY stdio.","severity":"gotcha","affected_versions":"1.3.1"},{"fix":"Upgrade Node.js to >=18.0.0.","message":"Node.js <18.0.0 not supported; engines field enforced with warning.","severity":"gotcha","affected_versions":"<18.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Add 'type': 'module' to package.json or rename file to .mjs.","cause":"Trying to import in a CommonJS file.","error":"SyntaxError: Cannot use import statement outside a module"},{"fix":"Run npm i -g codex-multi-auth.","cause":"Package not installed globally or not on PATH.","error":"Error: Cannot find module 'codex-multi-auth'"},{"fix":"Use import { AuthManager } from 'codex-multi-auth' instead of default import.","cause":"Using default import when package only exports named exports.","error":"TypeError: codexMultiAuth is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}