explaingit

serein431/remote-codex-api

14RustAudience · developerComplexity · 3/5ActiveSetup · moderate

TLDR

Rust and Tauri tray app that lets the Codex desktop client route model requests through third-party APIs while keeping the ChatGPT login, Codex Remote, plugins, and quota lookup working.

Mindmap

mindmap
  root((Remote-Codex-API))
    Inputs
      Third-party API keys
      ChatGPT login session
      Codex history files
    Outputs
      Codex provider config
      System keychain entries
      Synced session index
    Use Cases
      Switch between providers
      Keep ChatGPT login active
      Backup before apply
    Tech Stack
      Rust
      Tauri
      npm
      Keychain

Things people build with this

USE CASE 1

Save several third-party model provider configurations and switch between them with one click from the system tray.

USE CASE 2

Keep the ChatGPT login on the Codex desktop app while routing actual chat traffic to a local proxy or alternative API.

USE CASE 3

Store provider tokens in the macOS Keychain or Windows Credential Manager instead of plain config files.

USE CASE 4

Take an automatic backup of Codex configuration before applying any change so a broken setup can be rolled back.

Tech stack

RustTauriTypeScriptnpmSQLite

Getting it running

Difficulty · moderate Time to first run · 1h+

Building requires a Rust and Tauri toolchain plus npm, and the user must have a working Codex desktop install and ChatGPT login before configuration helps.

In plain English

Remote Codex API is a small desktop tray app written in Rust with Tauri that lets people use third-party model providers with the Codex desktop app while keeping the ChatGPT login, Codex Remote, plugins, quota lookup, and local history all working. The README is in Chinese and stresses that the project does not inject anything into the Codex UI and does not modify the installed Codex App. It only manages provider configuration on the side. The problem it solves is that many users want to route Codex chat requests through a third-party API or a local proxy, but features such as Codex Mobile, Codex Remote, plugins, and quota lookup depend on a real ChatGPT login. Editing the configuration by hand to keep the account signed into ChatGPT while routing model traffic elsewhere is error-prone and inconvenient when switching between providers. Remote Codex API turns that work into a visual flow: the user signs into ChatGPT through Codex first, then enables a third-party API configuration, and Codex keeps the ChatGPT login while the actual model requests go to the chosen provider. Core features include saving multiple third-party API configurations and switching between them with one click, storing provider tokens in the system credential store (macOS Keychain or Windows Credential Manager), preserving the ChatGPT login state, exposing a stable internal provider name called remote-codex-api so Codex always sees the same provider while the underlying credentials change, lightweight history syncing that re-aligns provider metadata without rewriting chat content, support for custom history directories such as Windows plus WSL paths, and an automatic backup before each apply. Internally, the README explains, two chains stay separate. Account state stays on the ChatGPT login path so Remote, plugins, and quota lookup keep working. Model requests follow the Provider configuration, which Codex always sees under the fixed remote-codex-api bucket. History sync only re-aligns Provider fields in Codex's SQLite database, rollout session files, and session_index.jsonl, skipping empty threads so the sidebar refreshes quickly. The project ships first on macOS and Windows, built with npm install, npm run tauri dev for development, and npm run tauri:build:app for packaging. Stated security boundaries include no patching of the Codex install, no UI injection, no chat upload, no cross-account cloud migration, and desensitized token display in logs.

Copy-paste prompts

Prompt 1
Walk me through cloning Remote-Codex-API and running it locally with npm install and npm run tauri dev on macOS.
Prompt 2
Show me how to add a new third-party provider configuration that points to a local OpenAI-compatible proxy on localhost.
Prompt 3
Help me understand how Remote-Codex-API keeps the ChatGPT login working while my chat requests go to a different provider.
Prompt 4
Package Remote-Codex-API as a Windows installer using npm run tauri:build:app and tell me where the output binary lands.
Prompt 5
Audit the parts of Remote-Codex-API that touch the Codex SQLite database and rollout session files so I can review the history sync before running it.
Open on GitHub → Explain another repo

Generated 2026-05-22 · Model: sonnet-4-6 · Verify against the repo before relying on details.