a bridge enabling codex subscription usage in Cursor
README.md
# codex-cursor-bridge > Use your **ChatGPT Pro / Plus** subscription to power **Cursor** (or any > OpenAI-API-compatible tool), instead of paying separately for OpenAI API > credits. [![npm](https://img.shields.io/npm/v/codex-cursor-bridge)](https://www.npmjs.com/package/codex-cursor-bridge) ## Quick start Need: a **ChatGPT Pro/Plus** plan, **Node 22.5+**, and the [Codex CLI](https://github.com/openai/codex) signed in. ```bash codex login # if you haven't already — writes ~/.codex/auth.json npx codex-cursor-bridge ``` That's the whole thing for **Aider / Continue / Cline / the OpenAI SDK** — point them at `http://127.0.0.1:7711/v1`, use any non-empty API key, and pick a [`bridge-*` model](#model-aliases) (e.g. `bridge-pro-high`). **Using Cursor?** One extra step. Cursor's BYOK calls come from Cursor's *cloud*, not your editor, so the bridge needs a public URL. Install [ngrok](https://ngrok.com/download) (free tier is fine), then run the guided setup — it opens a tunnel, generates an auth token, and auto-configures Cursor for you: ```bash npx codex-cursor-bridge --setup ``` Then paste the printed token into Cursor → Settings → Models → OpenAI API Key and pick a `bridge-*` model. Full walkthrough: [Cursor specifics](#cursor-specifics). --- ## What it is A small zero-npm-dependency Node CLI. It accepts OpenAI-style `/v1/chat/completions` requests on `localhost`, translates them to the **Responses API**, and forwards them to the same backend the official [`codex` CLI](https://github.com/openai/codex) uses (`https://chatgpt.com/backend-api/codex/responses`). Authentication is the ChatGPT-OAuth token that `codex login` already wrote to `~/.codex/auth.json`, so usage is billed against your ChatGPT subscription rather than the metered API. ``` Cursor cloud / Aider / codex-cursor-bridge ChatGPT-Pro any OpenAI client (localhost:7711 + optional Codex backend ngrok tunnel for Cursor) │ …