codex-multi-auth  by ndycode

Multi-account OAuth manager for Codex CLI

Created 3 months ago
295 stars

Top 89.5% on SourcePulse

GitHubView on GitHub
Project Summary

This project provides a multi-account OAuth manager for the OpenAI Codex CLI, enabling explicit ChatGPT account login, account switching, health checks, and runtime rotation. It targets developers seeking a more transparent and recoverable local Codex CLI workflow, offering features like account state visibility, deterministic switching, and diagnostic tools without modifying the official Codex binary.

How It Works

The solution introduces three global binaries: codex-multi-auth for primary account management, codex-multi-auth-codex as an optional forwarding wrapper, and codex-multi-auth-app-launcher as a helper. It manages OAuth credentials locally, allowing explicit account selection, health checks, and diagnostics. A key feature is the default-on loopback-only runtime rotation proxy, which enables live account rotation within forwarded Codex CLI or application sessions without altering official binaries.

Quick Start & Requirements

  • Primary install: npm i -g codex-multi-auth
  • Prerequisites: Official Codex CLI installed and available on the system PATH. Node.js is required for npm.
  • Documentation: Links to detailed guides are available within the repository, including docs/README.md, docs/getting-started.md, and docs/reference/commands.md.

Highlighted Details

  • Dedicated codex-multi-auth command family for explicit account management (login, status, switch, forecast, rotation).
  • Interactive terminal dashboard with hotkeys for streamlined account management and search.
  • Project-scoped account storage (~/.codex/multi-auth/projects/<project-key>/) for repository-specific workflows.
  • Health-aware account selection, quota forecasting, automatic failover, and flagged-account recovery tools.
  • Local usage ledger, budget guards, account policy controls, and model/account capability views.

Maintenance & Community

No specific details on maintainers, sponsorships, or community channels (like Discord/Slack) are provided in the README. Release notes for various versions are linked.

Licensing & Compatibility

The project is released under the MIT License. It is explicitly stated as an independent open-source project, not an official OpenAI product. Users are responsible for their own usage and policy compliance. It is intended for personal development use; production or commercial workloads should utilize the official OpenAI Platform API.

Limitations & Caveats

This tool is intended for personal development use and is not an official OpenAI product. Users are responsible for their own usage and compliance with OpenAI's policies. OAuth callback port conflicts may require manual resolution. Browser launch may be blocked in headless environments, necessitating alternative login methods like --device-auth.

Health Check
Last Commit

2 days ago

Responsiveness

Inactive

Pull Requests (30d)
37
Issues (30d)
7
Star History
209 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.