Registry / llm-agents / codex-multi-auth

codex-multi-auth

JSON →
library1.3.2jsnpmunverified

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.

npm install codex-multi-auth
INSTALL
IMPORT
SIG · CODEX-MULTI-AUTH
C
codex-multi-auth
llm-agentsjavascriptv1.3.2
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import codexMultiAuth from 'codex-multi-auth'
const codexMultiAuth = require('codex-multi-auth')
ESM-only; CJS require will fail.
AuthManager
import { AuthManager } from 'codex-multi-auth'
import { AuthManager } from 'codex-multi-auth/dist'
Named export; no subpath needed.
Account
import type { Account } from 'codex-multi-auth'
import { Account } from 'codex-multi-auth'
Account is a type-only export; use import type to avoid runtime error.

Install globally, log in, verify status, list accounts, switch account, and preview routing decision.

npm i -g @openai/codex npm i -g codex-multi-auth codex auth login codex auth status codex auth list codex auth switch 2 codex auth forecast --live
Debug
Known issues
breakingLegacy scoped package @ndycode/codex-multi-auth is migration-only; new installs must use codex-multi-auth.
fix
npm uninstall -g @ndycode/codex-multi-auth && npm i -g codex-multi-auth
affects: <1.0.0
deprecatedCJS require() will fail in v1.3+; project is ESM-only.
fix
Use import statements and set 'type': 'module' in package.json.
affects: >=1.3.0
gotchaInteractive Codex runs after GPT-5.5 rollout broke in v1.3.1; fixed in v1.3.2 by preserving TTY stdio.
fix
Upgrade to v1.3.2.
affects: 1.3.1
gotchaNode.js <18.0.0 not supported; engines field enforced with warning.
fix
Upgrade Node.js to >=18.0.0.
affects: <18.0.0
Errors
Common errors & fixes
SyntaxError: Cannot use import statement outside a module
Trying to import in a CommonJS file.
fix
Add 'type': 'module' to package.json or rename file to .mjs.
Error: Cannot find module 'codex-multi-auth'
Package not installed globally or not on PATH.
fix
Run npm i -g codex-multi-auth.
TypeError: codexMultiAuth is not a function
Using default import when package only exports named exports.
fix
Use import { AuthManager } from 'codex-multi-auth' instead of default import.
Upgrade
Version history
1.3.2latest on npm
Audit
Dependencies
typescriptoptionalPeer dependency for type declarations
Agent activity
42 hits · last 30 days
node
36
OpenAI (training)
1
Resources
codex-multi-auth — npm install codex-multi-auth · libregistry