{"id":46194620,"url":"https://github.com/ndycode/codex-multi-auth","last_synced_at":"2026-04-05T05:02:20.017Z","repository":{"id":340041983,"uuid":"1164286171","full_name":"ndycode/codex-multi-auth","owner":"ndycode","description":"OpenAI Codex CLI multi-account OAuth manager with resilient routing, quota-aware rotation, and terminal-first diagnostics.","archived":false,"fork":false,"pushed_at":"2026-04-01T09:09:44.000Z","size":2948,"stargazers_count":20,"open_issues_count":17,"forks_count":4,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-01T09:19:03.708Z","etag":null,"topics":["account-rotation","authentication","chatgpt","cli-tool","codex","codex-cli","developer-tools","fault-tolerance","multi-account","nodejs","oauth2","openai","pkce","productivity-tools","rate-limit-handling","resilient-systems","session-recovery","terminal-ui","token-refresh","typescript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/codex-multi-auth","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ndycode.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-02-22T22:37:04.000Z","updated_at":"2026-03-28T21:39:44.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ndycode/codex-multi-auth","commit_stats":null,"previous_names":["ndycode/codex-multi-auth"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/ndycode/codex-multi-auth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ndycode%2Fcodex-multi-auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ndycode%2Fcodex-multi-auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ndycode%2Fcodex-multi-auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ndycode%2Fcodex-multi-auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ndycode","download_url":"https://codeload.github.com/ndycode/codex-multi-auth/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ndycode%2Fcodex-multi-auth/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31424931,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T02:22:46.605Z","status":"ssl_error","status_checked_at":"2026-04-05T02:22:33.263Z","response_time":75,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["account-rotation","authentication","chatgpt","cli-tool","codex","codex-cli","developer-tools","fault-tolerance","multi-account","nodejs","oauth2","openai","pkce","productivity-tools","rate-limit-handling","resilient-systems","session-recovery","terminal-ui","token-refresh","typescript"],"created_at":"2026-03-03T02:03:06.523Z","updated_at":"2026-04-05T05:02:19.997Z","avatar_url":"https://github.com/ndycode.png","language":"TypeScript","readme":"# codex-multi-auth\n\n[![npm version](https://img.shields.io/npm/v/codex-multi-auth.svg)](https://www.npmjs.com/package/codex-multi-auth)\n[![npm downloads](https://img.shields.io/npm/dw/codex-multi-auth.svg)](https://www.npmjs.com/package/codex-multi-auth)\n\nCodex CLI-first multi-account OAuth manager for the official `@openai/codex` CLI.\n\n\u003cimg width=\"1270\" height=\"729\" alt=\"2026-02-28 12_54_58-prompt txt ‎- Notepads\" src=\"https://github.com/user-attachments/assets/0cecb77e-a6d3-432a-ba48-3577db0c7093\" /\u003e\n\n\n\u003e [!NOTE]\n\u003e Legacy scoped prerelease package `@ndycode/codex-multi-auth` is migration-only.\n\u003e Use `codex-multi-auth` for all new installs.\n## What You Get\n\n- Canonical `codex auth ...` workflow for account login, switching, checks, and diagnostics\n- Multi-account OAuth pool with health-aware selection and automatic failover\n- Project-scoped account storage under `~/.codex/multi-auth/projects/\u003cproject-key\u003e/...`\n- Interactive dashboard for account actions and settings\n- Experimental settings tab for staged sync, backup, and refresh-guard controls\n- Forecast, report, fix, and doctor commands for operational safety\n- Flagged account verification and restore flow\n- Session affinity and live account sync controls\n- Proactive refresh and preemptive quota deferral controls\n- Codex-oriented request/prompt compatibility with strict runtime handling\n- Stable docs set for install, config, troubleshooting, and upgrade paths\n\n---\n\n\u003cdetails open\u003e\n\u003csummary\u003e\u003cb\u003eTerms and Usage Notice\u003c/b\u003e\u003c/summary\u003e\n\n\u003e [!CAUTION]\n\u003e This project uses OAuth account credentials and is intended for personal development use.\n\u003e\n\u003e By using this plugin, you acknowledge:\n\u003e - This is an independent open-source project, not an official OpenAI product\n\u003e - You are responsible for your own usage and policy compliance\n\u003e - For production/commercial workloads, use the OpenAI Platform API\n\n\u003c/details\u003e\n\n---\n\n## Installation\n\n\u003cdetails open\u003e\n\u003csummary\u003e\u003cb\u003eFor Humans\u003c/b\u003e\u003c/summary\u003e\n\n### Option A: Standard install\n\n```bash\nnpm i -g codex-multi-auth\n```\n\n### Option B: Migrate from legacy scoped prerelease\n\n```bash\nnpm uninstall -g @ndycode/codex-multi-auth\nnpm i -g codex-multi-auth\n```\n\n### Option C: Verify wiring\n\n`codex --version` confirms the official Codex CLI is reachable. `codex-multi-auth --version` confirms the installed wrapper package version.\n\n```bash\ncodex --version\ncodex-multi-auth --version\ncodex auth status\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eFor LLM Agents\u003c/b\u003e\u003c/summary\u003e\n\n### Step-by-step\n\n1. Install global package:\n   - `npm i -g codex-multi-auth`\n2. Run first login flow with `codex auth login`\n3. Validate state with `codex auth status` and `codex auth check`\n4. Confirm routing with `codex auth forecast --live`\n\n### Verification\n\n```bash\ncodex auth status\ncodex auth check\n```\n\n\u003c/details\u003e\n\n---\n\n## Quick Start\n\nInstall and sign in:\n\n```bash\nnpm i -g @openai/codex\nnpm i -g codex-multi-auth\ncodex auth login\n```\n\nVerify the wrapper and the new account:\n\n```bash\ncodex auth status\ncodex auth check\n```\n\nUse these next:\n\n```bash\ncodex auth list\ncodex auth switch 2\ncodex auth forecast --live\n```\n\nIf browser launch is blocked, use the alternate login paths in [docs/getting-started.md](docs/getting-started.md#alternate-login-paths).\n\n---\n\n## Command Toolkit\n\n### Start here\n\n| Command | What it answers |\n| --- | --- |\n| `codex auth login` | How do I add or re-open the account menu? |\n| `codex auth status` | Is the wrapper active right now? |\n| `codex auth check` | Do my saved accounts look healthy? |\n\n### Daily use\n\n| Command | What it answers |\n| --- | --- |\n| `codex auth list` | Which accounts are saved and which one is active? |\n| `codex auth switch \u003cindex\u003e` | How do I move to a different saved account? |\n| `codex auth forecast --live` | Which account looks best for the next session? |\n\n### Repair\n\n| Command | What it answers |\n| --- | --- |\n| `codex auth verify-flagged` | Can any previously flagged account be restored? |\n| `codex auth fix --dry-run` | What safe storage or account repairs are available? |\n| `codex auth doctor --fix` | Can the CLI diagnose and apply the safest fixes now? |\n\n### Advanced\n\n| Command | What it answers |\n| --- | --- |\n| `codex auth report --live --json` | How do I get the full machine-readable health report? |\n| `codex auth fix --live --model gpt-5-codex` | How do I run live repair probes with a chosen model? |\n\n---\n\n## Dashboard Hotkeys\n\n### Main dashboard\n\n| Key | Action |\n| --- | --- |\n| `Up` / `Down` | Move selection |\n| `Enter` | Select/open |\n| `1-9` | Quick switch |\n| `/` | Search |\n| `?` | Toggle help |\n| `Q` | Back/cancel |\n\n### Account details\n\n| Key | Action |\n| --- | --- |\n| `S` | Set current account |\n| `R` | Refresh/re-login account |\n| `E` | Enable/disable account |\n| `D` | Delete account |\n\n---\n\n## Storage Paths\n\n| File | Default path |\n| --- | --- |\n| Settings | `~/.codex/multi-auth/settings.json` |\n| Accounts | `~/.codex/multi-auth/openai-codex-accounts.json` |\n| Flagged accounts | `~/.codex/multi-auth/openai-codex-flagged-accounts.json` |\n| Quota cache | `~/.codex/multi-auth/quota-cache.json` |\n| Logs | `~/.codex/multi-auth/logs/codex-plugin/` |\n| Per-project accounts | `~/.codex/multi-auth/projects/\u003cproject-key\u003e/openai-codex-accounts.json` |\n\nOverride root with `CODEX_MULTI_AUTH_DIR=\u003cpath\u003e`.\n\n---\n\n## Configuration\n\nPrimary config root:\n- `~/.codex/multi-auth/settings.json`\n- or `CODEX_MULTI_AUTH_DIR/settings.json` when custom root is set\n\nSelected runtime/environment overrides:\n\n| Variable | Effect |\n| --- | --- |\n| `CODEX_MULTI_AUTH_DIR` | Override settings/accounts root |\n| `CODEX_MULTI_AUTH_CONFIG_PATH` | Alternate config file path |\n| `CODEX_MODE=0/1` | Disable/enable Codex mode |\n| `CODEX_TUI_V2=0/1` | Disable/enable TUI v2 |\n| `CODEX_TUI_COLOR_PROFILE=truecolor|ansi256|ansi16` | TUI color profile |\n| `CODEX_TUI_GLYPHS=ascii|unicode|auto` | TUI glyph style |\n| `CODEX_AUTH_BACKGROUND_RESPONSES=0/1` | Opt in/out of stateful Responses `background: true` compatibility |\n| `CODEX_AUTH_FETCH_TIMEOUT_MS=\u003cms\u003e` | Request timeout override |\n| `CODEX_AUTH_STREAM_STALL_TIMEOUT_MS=\u003cms\u003e` | Stream stall timeout override |\n\nValidate config after changes:\n\n```bash\ncodex auth status\ncodex auth check\ncodex auth forecast --live\n```\n\nResponses background mode stays opt-in. Enable `backgroundResponses` in settings or `CODEX_AUTH_BACKGROUND_RESPONSES=1` only for callers that intentionally send `background: true`, because those requests switch from stateless `store=false` routing to stateful `store=true`. See [docs/upgrade.md](docs/upgrade.md) for rollout guidance.\n\n---\n\n## Experimental Settings Highlights\n\nThe Settings menu now includes an `Experimental` section for staged features:\n\n- preview-first sync into `oc-chatgpt-multi-auth`\n- named local pool backup export with filename prompt\n- refresh guard toggle and interval controls moved out of Backend Controls\n\nThese flows are intentionally non-destructive by default: sync previews before apply, destination-only accounts are preserved, and backup filename collisions fail safely.\n\n---\n\n## Troubleshooting\n\n\u003cdetails open\u003e\n\u003csummary\u003e\u003cb\u003e60-second recovery\u003c/b\u003e\u003c/summary\u003e\n\n```bash\ncodex auth doctor --fix\ncodex auth check\ncodex auth forecast --live\n```\n\nIf still broken:\n\n```bash\ncodex auth login\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eCommon symptoms\u003c/b\u003e\u003c/summary\u003e\n\n- `codex auth` unrecognized: run `where codex`, then follow `docs/troubleshooting.md` for routing fallback commands\n- Switch succeeds but wrong account appears active: run `codex auth switch \u003cindex\u003e`, then restart session\n- OAuth callback on port `1455` fails: free the port and re-run `codex auth login`\n- Browser launch is blocked or you are in a headless shell: re-run `codex auth login --manual` or set `CODEX_AUTH_NO_BROWSER=1`\n- `missing field id_token` / `token_expired` / `refresh_token_reused`: re-login affected account\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eDiagnostics pack\u003c/b\u003e\u003c/summary\u003e\n\n```bash\ncodex auth list\ncodex auth status\ncodex auth check\ncodex auth verify-flagged --json\ncodex auth forecast --live\ncodex auth fix --dry-run\ncodex auth report --live --json\ncodex auth doctor --json\n```\n\n\u003c/details\u003e\n\n---\n\n## Documentation\n\n- Docs portal: [docs/README.md](docs/README.md)\n- Getting started: [docs/getting-started.md](docs/getting-started.md)\n- Features: [docs/features.md](docs/features.md)\n- Configuration: [docs/configuration.md](docs/configuration.md)\n- Troubleshooting: [docs/troubleshooting.md](docs/troubleshooting.md)\n- Commands reference: [docs/reference/commands.md](docs/reference/commands.md)\n- Public API contract: [docs/reference/public-api.md](docs/reference/public-api.md)\n- Error contracts: [docs/reference/error-contracts.md](docs/reference/error-contracts.md)\n- Settings reference: [docs/reference/settings.md](docs/reference/settings.md)\n- Storage paths: [docs/reference/storage-paths.md](docs/reference/storage-paths.md)\n- Upgrade guide: [docs/upgrade.md](docs/upgrade.md)\n- Privacy: [docs/privacy.md](docs/privacy.md)\n\n---\n\n## Release Notes\n\n- Current stable: [docs/releases/v1.2.3.md](docs/releases/v1.2.3.md)\n- Previous stable: [docs/releases/v1.2.2.md](docs/releases/v1.2.2.md)\n- Earlier stable: [docs/releases/v1.2.1.md](docs/releases/v1.2.1.md)\n- Archived prerelease: [docs/releases/v0.1.0-beta.0.md](docs/releases/v0.1.0-beta.0.md)\n\n## License\n\nMIT License. See [LICENSE](LICENSE).\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eLegal\u003c/b\u003e\u003c/summary\u003e\n\n- Not affiliated with OpenAI.\n- \"ChatGPT\", \"Codex\", and \"OpenAI\" are trademarks of OpenAI.\n- You assume responsibility for your own usage and compliance.\n\n\u003c/details\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fndycode%2Fcodex-multi-auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fndycode%2Fcodex-multi-auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fndycode%2Fcodex-multi-auth/lists"}