better-opencode-openai-codex-auth
v0.1.5
Published
OpenAI ChatGPT (Codex backend) OAuth auth plugin for opencode - use your ChatGPT Plus/Pro subscription instead of API credits
Maintainers
Readme
Maintained by ShivamB25 | Originally by Numman Ali
One install. Every Codex model.
Install · Models · Configuration · Docs
Philosophy
Use your ChatGPT Plus/Pro subscription for coding. No API credits. One config file, access to all GPT-5.x and Codex models.
ChatGPT OAuth → Codex backend → OpenCodeQuick Start
bunx better-opencode-openai-codex-auth@latestThen authenticate and run:
opencode auth login
opencode run "write hello world to test.txt" --model=openai/gpt-5.4 --variant=mediumUninstall:
bunx better-opencode-openai-codex-auth@latest --uninstall
bunx better-opencode-openai-codex-auth@latest --uninstall --allBeta/Dev Versions
Test the latest features from the dev branch before they're released:
# Install latest dev version
bun add better-opencode-openai-codex-auth@dev
# Or install latest beta
bun add better-opencode-openai-codex-auth@betaAvailable tags:
@dev- Latest commit fromdevbranch (auto-published on every push)@beta- Beta releases for testing@preview- Preview builds for specific branches
To test a specific dev version:
bunx better-opencode-openai-codex-auth@devModels
- gpt-5.3 (none/low/medium/high/xhigh)
- gpt-5.3-codex (low/medium/high/xhigh)
- gpt-5.4 (none/low/medium/high/xhigh)
- gpt-5.4-pro (medium/high/xhigh)
Configuration
- Modern (OpenCode v1.0.210+):
config/opencode-modern.json
Minimal configs don't work with GPT-5.x; use the full configs above.
Features
- ChatGPT Plus/Pro OAuth (same flow as official Codex CLI)
- 18 model presets across GPT-5.4 and GPT-5.3 families
- Variant system support (v1.0.210+)
- Multimodal input for all models
- Usage-aware errors with automatic token refresh
- Multi-account pool with round-robin or sticky selection (
~/.opencode/openai-codex-accounts.json)
Documentation
Usage Notice
This plugin is for personal development with your own ChatGPT Plus/Pro subscription. For production or multi-user applications, use the OpenAI Platform API.
