OpenCode plugin that authenticates OpenAI provider traffic with ChatGPT OAuth and routes requests through Codex backend endpoints.
Quick links: Getting Started · Configuration · Accounts and Rotation · Troubleshooting
Install and register the plugin:
npx -y @iam-brain/opencode-codex-authAuthenticate:
opencode auth loginRun one request:
opencode run "say hi" --model=openai/gpt-5.3-codexIf openai/gpt-5.3-codex is not available on your account, use another available openai/* model.
npx -y @iam-brain/opencode-codex-auth runs install by default (bin/opencode-codex-auth.ts, lib/installer-cli.ts).
Installer actions:
- Ensures
@iam-brain/opencode-codex-auth@latestexists in~/.config/opencode/opencode.json(lib/opencode-install.ts). - Creates
~/.config/opencode/codex-config.jsonif missing (lib/config.ts). - Synchronizes
/create-personalitycommand template (lib/personality-command.ts). - Synchronizes
personality-builderskill files (lib/personality-skill.ts).
Re-run installer safely:
npx -y @iam-brain/opencode-codex-auth installnative(default): native OpenCode-style identity/header path.codex: codex-style identity/header path.
Mode behavior source of truth: lib/config.ts and lib/codex-native.ts.
- Plugin account store:
~/.config/opencode/codex-accounts.json(lib/storage.ts). - Plugin config:
~/.config/opencode/codex-config.json(lib/config.ts). - Session affinity cache:
~/.config/opencode/cache/codex-session-affinity.json(lib/session-affinity.ts). - Quota snapshot cache:
~/.config/opencode/cache/codex-snapshots.json(lib/codex-status-storage.ts). - OpenCode provider marker:
~/.local/share/opencode/auth.json(read for transfer checks inlib/storage.ts).
- Docs index:
docs/README.md - User docs:
docs/getting-started.md,docs/configuration.md,docs/accounts-and-rotation.md,docs/troubleshooting.md,docs/privacy-and-data-handling.md - Maintainer docs:
docs/maintainers/releasing.md,docs/maintainers/documentation-standards.md - Development internals:
docs/development/
npm install
npm run verifyThis plugin is intended for personal development use with your own ChatGPT account. For production multi-user systems, use the OpenAI Platform API.