codex-auth-automation
v0.1.2
Published
Automated OpenAI/Codex account creation with Gmail aliases
Maintainers
Readme
Codex Auth Automation
Automated OpenAI/Codex account creation using Gmail aliases. Creates new accounts on demand with zero manual intervention.
How It Works
- Uses Gmail aliases (
[email protected],[email protected], etc.) — all codes land in your real inbox - Reads verification codes from Gmail via IMAP
- Automates the OpenAI OAuth flow with Playwright (headless browser)
- Captures and stores OAuth tokens directly into
~/.local/share/opencode/auth.json
Quick Start
# Install (auto-installs Chromium)
npm install -g codex-auth-automation
# Setup (interactive)
codex-auth setup
# Create a new account
codex-auth create
# View all accounts
codex-auth status
# Rotate to next account
codex-auth rotateSetup
1. Create a Gmail App Password
- Go to https://myaccount.google.com/apppasswords
- Sign in → Search "App Passwords" → Create one
- Name it something like "codex-auth"
- Copy the 16-character password
2. Run Setup
codex-auth setupEnter your Gmail address and App Password when prompted.
3. Create Accounts
codex-auth createEach run creates a new account with the next alias (+codex1, +codex2, etc.).
Commands
| Command | Description |
|---------|-------------|
| codex-auth setup | Interactive setup wizard |
| codex-auth create | Create a new Codex account |
| codex-auth create --alias [email protected] | Create with specific alias |
| codex-auth status | Show all accounts with status |
| codex-auth rotate | Rotate to next account |
| codex-auth clean | Remove expired/invalid accounts |
| codex-auth config | View current config |
| codex-auth config --set headless false | Show browser during signup |
Requirements
- Node.js 18+
- Gmail account with App Password enabled
- Chromium (auto-installed via postinstall)
License
MIT
