|
1 | | -# OpenAI Codex OAuth Plugin for OpenCode |
2 | | - |
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | +**Curated by [Numman Ali](https://x.com/nummanali)** |
| 5 | +[](https://x.com/nummanali) |
3 | 6 | [](https://www.npmjs.com/package/opencode-openai-codex-auth) |
4 | 7 | [](https://github.com/numman-ali/opencode-openai-codex-auth/actions) |
5 | 8 | [](https://www.npmjs.com/package/opencode-openai-codex-auth) |
| 9 | +**One install. Every Codex model.** |
| 10 | +[Install](#-quick-start) · [Models](#-models) · [Configuration](#-configuration) · [Docs](#-docs) |
6 | 11 |
|
7 | | - |
8 | | - |
9 | | -Use your ChatGPT Plus/Pro subscription inside OpenCode via official OAuth (Codex backend). |
10 | | - |
11 | | -## Install / Update (1 command) |
12 | | - |
| 12 | +--- |
| 13 | +## 💡 Philosophy |
| 14 | +> **"One config. Every model."** |
| 15 | +OpenCode should feel effortless. This plugin keeps the setup minimal while giving you full GPT‑5.x + Codex access via ChatGPT OAuth. |
| 16 | +``` |
| 17 | +┌─────────────────────────────────────────────────────────┐ |
| 18 | +│ │ |
| 19 | +│ ChatGPT OAuth → Codex backend → OpenCode │ |
| 20 | +│ One command install, full model presets, done. │ |
| 21 | +│ │ |
| 22 | +└─────────────────────────────────────────────────────────┘ |
| 23 | +``` |
| 24 | +--- |
| 25 | +## 🚀 Quick Start |
13 | 26 | ```bash |
14 | 27 | npx -y opencode-openai-codex-auth@latest |
15 | 28 | ``` |
16 | | - |
17 | | -What it does: |
18 | | -- Writes the **global** config at `~/.config/opencode/opencode.json` |
19 | | -- Uses the **modern** variants config by default |
20 | | -- Backs up your existing config |
21 | | -- Clears OpenCode’s plugin cache so the latest version installs |
22 | | - |
23 | | -Legacy OpenCode (v1.0.209 and below): |
24 | | - |
25 | | -```bash |
26 | | -npx -y opencode-openai-codex-auth@latest --legacy |
27 | | -``` |
28 | | - |
29 | | -## Quick Start |
30 | | - |
| 29 | +Then: |
31 | 30 | ```bash |
32 | 31 | opencode auth login |
33 | 32 | opencode run "write hello world to test.txt" --model=openai/gpt-5.2 --variant=medium |
34 | 33 | ``` |
35 | | - |
36 | | -Legacy usage: |
37 | | - |
| 34 | +Legacy OpenCode (v1.0.209 and below): |
38 | 35 | ```bash |
| 36 | +npx -y opencode-openai-codex-auth@latest --legacy |
39 | 37 | opencode run "write hello world to test.txt" --model=openai/gpt-5.2-medium |
40 | 38 | ``` |
41 | | - |
42 | | -## Models (22 presets) |
43 | | - |
| 39 | +--- |
| 40 | +## 📦 Models |
44 | 41 | - **gpt-5.2** (none/low/medium/high/xhigh) |
45 | 42 | - **gpt-5.2-codex** (low/medium/high/xhigh) |
46 | 43 | - **gpt-5.1-codex-max** (low/medium/high/xhigh) |
47 | 44 | - **gpt-5.1-codex** (low/medium/high) |
48 | 45 | - **gpt-5.1-codex-mini** (medium/high) |
49 | 46 | - **gpt-5.1** (none/low/medium/high) |
50 | | - |
51 | | -## Configuration (Manual) |
52 | | - |
| 47 | +--- |
| 48 | +## 🧩 Configuration |
53 | 49 | - Modern (OpenCode v1.0.210+): `config/opencode-modern.json` |
54 | 50 | - Legacy (OpenCode v1.0.209 and below): `config/opencode-legacy.json` |
55 | 51 |
|
56 | | -Minimal configs are not supported for GPT 5.x; use the full configs above. |
57 | | - |
58 | | -## Docs |
59 | | - |
| 52 | +Minimal configs are not supported for GPT‑5.x; use the full configs above. |
| 53 | +--- |
| 54 | +## ✅ Features |
| 55 | +- ChatGPT Plus/Pro OAuth authentication (official flow) |
| 56 | +- 22 model presets across GPT‑5.2 / GPT‑5.2 Codex / GPT‑5.1 families |
| 57 | +- Variant system support (v1.0.210+) + legacy presets |
| 58 | +- Multimodal input enabled for all models |
| 59 | +- Usage‑aware errors + automatic token refresh |
| 60 | +--- |
| 61 | +## 📚 Docs |
60 | 62 | - Getting Started: `docs/getting-started.md` |
61 | 63 | - Configuration: `docs/configuration.md` |
62 | 64 | - Troubleshooting: `docs/troubleshooting.md` |
63 | 65 | - Architecture: `docs/development/ARCHITECTURE.md` |
64 | | - |
65 | | -## Usage Notice (Short) |
66 | | - |
| 66 | +--- |
| 67 | +## ⚠️ Usage Notice |
67 | 68 | This plugin is for **personal development use** with your own ChatGPT Plus/Pro subscription. |
68 | | -For production or multi-user applications, use the OpenAI Platform API. |
| 69 | +For production or multi‑user applications, use the OpenAI Platform API. |
69 | 70 |
|
70 | | -Follow on X: [@nummanthinks](https://x.com/nummanthinks) |
| 71 | +**Built for developers who value simplicity.** |
0 commit comments