Add to your opencode.json:
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-openai-codex-auth@4.1.1"]
}
Then run:
opencode auth login
Select "OpenAI" → "ChatGPT Plus/Pro (Codex Subscription)"
See the full configuration for all model variants.
Curated by Numman Ali
One install. Every Codex model.
Install · Models · Configuration · Docs
"One config. Every model." OpenCode should feel effortless. This plugin keeps the setup minimal while giving you full GPT‑5.x + Codex access via ChatGPT OAuth.
┌─────────────────────────────────────────────────────────┐
│ │
│ ChatGPT OAuth → Codex backend → OpenCode │
│ One command install, full model presets, done. │
│ │
└─────────────────────────────────────────────────────────┘
npx -y opencode-openai-codex-auth@latest
Then:
opencode auth login
opencode run "write hello world to test.txt" --model=openai/gpt-5.2 --variant=medium
Legacy OpenCode (v1.0.209 and below):
npx -y opencode-openai-codex-auth@latest --legacy
opencode run "write hello world to test.txt" --model=openai/gpt-5.2-medium
Uninstall:
npx -y opencode-openai-codex-auth@latest --uninstall
npx -y opencode-openai-codex-auth@latest --uninstall --all
config/opencode-modern.jsonconfig/opencode-legacy.jsondocs/getting-started.mddocs/configuration.mddocs/troubleshooting.mddocs/development/ARCHITECTURE.mdThis plugin is for personal development use with your own ChatGPT Plus/Pro subscription. For production or multi‑user applications, use the OpenAI Platform API.
Built for developers who value simplicity.
Sign in to leave a comment.