https://github.com/iam-brain/opencode-codex-auth
OpenCode OpenAI plugin for native Codex auth, multi-account rotation, and identity spoofing.
https://github.com/iam-brain/opencode-codex-auth
auth codex multi-account oauth openai opencode plugin
Last synced: 3 months ago
JSON representation
OpenCode OpenAI plugin for native Codex auth, multi-account rotation, and identity spoofing.
- Host: GitHub
- URL: https://github.com/iam-brain/opencode-codex-auth
- Owner: iam-brain
- License: mit
- Created: 2026-02-10T04:40:26.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2026-02-28T04:58:00.000Z (3 months ago)
- Last Synced: 2026-02-28T12:39:54.881Z (3 months ago)
- Topics: auth, codex, multi-account, oauth, openai, opencode, plugin
- Language: TypeScript
- Size: 784 KB
- Stars: 6
- Watchers: 0
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
# opencode-codex-auth
[](https://github.com/iam-brain/opencode-codex-auth/actions/workflows/ci.yml)
[](https://www.npmjs.com/package/@iam-brain/opencode-codex-auth)
OpenCode plugin for ChatGPT OAuth auth with multi-account management and Codex-compatible request behavior.
## Highlights
- 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).
## Requirements
- Node.js `22.x`
- npm `10.9.2` (via `packageManager` / Corepack)
- OpenCode CLI available on your PATH
## Install
```bash
npx -y @iam-brain/opencode-codex-auth@latest
```
Authenticate:
```bash
opencode auth login
```
Run with an OpenAI model:
```bash
opencode run "say hi" --model=openai/gpt-5
```
## Configuration
Keep 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](docs/configuration.md)
- Multi-account behavior: [docs/multi-account.md](docs/multi-account.md)
- Troubleshooting: [docs/troubleshooting.md](docs/troubleshooting.md)
## Documentation
- Docs index: [docs/README.md](docs/README.md)
- Getting started: [docs/getting-started.md](docs/getting-started.md)
- Persona tooling: [docs/persona-tool.md](docs/persona-tool.md)
- Releasing: [docs/releasing.md](docs/releasing.md)
- Development docs: [docs/development/README.md](docs/development/README.md)
## Development
```bash
npm install
npm run hooks:install
npm run verify
```
Helpful local commands:
```bash
npm run verify:local
npm run prepush
npm run lint
npm run test:coverage
npm run check:docs
```
Local 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.
## Usage Note
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.