Back to All Projects
Open Source Verified Architecture
codex-with-chatgpt
codex-with-chatgpt stitches ChatGPT’s planning abilities onto the proven Codex code‑generation engine, giving you a single interface where you can outline what you want, get the high‑level design from ChatGPT, and instantly receive ready‑to‑run code from Codex. It’s an open‑source bridge that lets developers leverage both models without juggling separate APIs.
4,117 Stars 438 Forks
Core Technologies & Frameworks
TypeScript
Technical Architecture & Specifications
### Overview & Architecture
Most developers running agentic setups hit a common bottleneck: burning high-cost API or agent tokens on architectural planning, debugging strategy, and code reviews while a paid ChatGPT web subscription sits unused.
`codex-with-chatgpt` offloads high-level planning to the official ChatGPT web app while keeping execution local inside Codex. It avoids reverse proxies, direct API keys, or mass file uploads. Instead, it exposes a local, read-only Model Context Protocol (MCP) server over an OAuth-protected tunnel.
```
+-------------------+ OAuth / Read-Only MCP +-------------------+
| ChatGPT Web UI | <-----------------------------> | local workspace |
| (Planning Brain) | via cloudflared | (Codex Executes) |
+-------------------+ +-------------------+
```
### How It Works Under the Hood
1. Read-Only MCP Bridge: The project runs a local Node.js server paired with `cloudflared` to expose a secure tunnel. ChatGPT connects as an MCP client and reads *only* the workspace lines it explicitly requests for context.
2. OAuth Security: The connection between ChatGPT and your local machine requires authentication via a pairing code to ensure no unauthorized access over the tunnel.
3. Skill-Based Handoff: A custom Codex skill installed at `~/.codex/skills/codex-with-chatgpt/SKILL.md` instructs Codex to yield strategic thinking tasks to the ChatGPT Web UI while retaining execution control.
---
### Prerequisites & Dependency Setup
Your environment requires:
* Git
* Node.js ($\ge 20$)
* Package Manager: `pnpm` (via Corepack)
* Tunneling Tool: `cloudflared` (installed via Homebrew on macOS or `winget` on Windows)
---
### Step-by-Step Installation & Configuration
#### 1. Clone the Repository
Clone the project locally into your home directory:
```bash
git clone https://github.com/XiaoDuoYa/codex-with-chatgpt ~/codex-with-chatgpt
```
#### 2. Install Dependencies & Build
Navigate to the directory and build the project artifacts using Corepack:
```bash
cd ~/codex-with-chatgpt
corepack pnpm install
corepack pnpm build
```
#### 3. Register the Codex Skill
Copy the provided skill manifest to the Codex skills folder and update the path string within the file to match `~/codex-with-chatgpt`:
```bash
mkdir -p ~/.codex/skills/codex-with-chatgpt
cp skill/SKILL.md ~/.codex/skills/codex-with-chatgpt/SKILL.md
```
#### 4. Run First-Time Setup & MCP Pairing
Initiate the setup routine to pair your local environment with ChatGPT:
```bash
c2c setup
```
This command triggers a browser-based workflow to open ChatGPT, configure the custom connector, and enter the OAuth pairing code generated by your local instance. Once verified, ChatGPT will read files on demand, leaving token-heavy execution tasks to Codex. If you encounter issues later, asking Codex to *"Update Codex with ChatGPT"* pulls the latest updates to keep the bridge running smoothly.
Reviewed by DevTechPulse Editorial Board
All listed blueprints, repositories, and case studies are verified against public documentation and LTS container environments. For inquiries or updates, view our Editorial Policy.