OpenCode plugin for ChatGPT OAuth auth with multi-account management and Codex-compatible request behavior.
- ChatGPT OAuth flow for OpenCode OpenAI provider usage.
- Multi-account storage, rotation, and account health controls.
- Runtime modes for native-compatible or codex-style request identity.
- Integrated auth UX via
opencode auth login(switch, refresh, disable, remove, transfer).
- Node.js
22.x - npm
10.9.2(viapackageManager/ Corepack) - OpenCode CLI available on your PATH
npx -y @iam-brain/opencode-codex-auth@latestAuthenticate:
opencode auth loginRun with an OpenAI model:
opencode run "say hi" --model=openai/gpt-5Keep plugin install/enablement in opencode.json, and runtime behavior in codex-config.jsonc. The plugin still accepts commented legacy codex-config.json files for compatibility.
- Config reference: docs/configuration.md
- Multi-account behavior: docs/multi-account.md
- Troubleshooting: docs/troubleshooting.md
- Docs index: docs/README.md
- Getting started: docs/getting-started.md
- Persona tooling: docs/persona-tool.md
- Releasing: docs/releasing.md
- Development docs: docs/development/README.md
npm install
npm run hooks:install
npm run verifyHelpful local commands:
npm run verify:local
npm run prepush
npm run lint
npm run test:coverage
npm run check:docsLocal git hooks now enforce npm run verify before both git commit and git push. The commit hook accepts staged-only commit-ready changes, and the push hook requires a clean tree so it verifies the exact commits being pushed. npm run verify:local runs the same enforcement manually, with a cache so unchanged trees do not rerun the full suite twice in a row.
Pull request CI stays intentionally lean: GitHub still runs clean-room verify, tarball smoke, Windows smoke, dependency review, and secret scanning. Dependency vulnerability auditing via npm audit now runs on default-branch pushes instead of every PR.
This plugin is intended for personal development usage with your own ChatGPT account. For production multi-user systems, use official OpenAI Platform API auth flows.