A clean-room compatibility launcher for Codex desktop app assets on native Windows and WSL.
This project does not redistribute OpenAI binaries. You can provide your own Codex DMG, or let the tool download the latest official DMG from OpenAI at runtime.
OpenAI's Codex desktop app is macOS-only. This project enables running it on Windows by extracting the app payload from a DMG, replacing native modules with compatible builds, and launching via the Codex CLI. It supports two runtime targets:
- Native Windows runtime.
- WSL runtime (Linux Electron + Linux Codex CLI + Linux
~/.codexstate).
- Staged prepare pipeline with manifest output.
- Reusable artifact cache keyed by DMG hash.
- Patch recipes with verification checks.
- Native module preparation and verification for Electron ABI compatibility.
doctorcommand for environment diagnostics.reportcommand for support bundles.- Automatic latest DMG download from official OpenAI links when local DMG is missing.
- Runtime selection:
windowsorwsl. - WSL runtime fallback modes:
prompt,windows,none.
- Windows 10/11
- Node.js 18+
- npm + npx (included with Node)
- Git
- 7-Zip (Ensure
7zis on yourPATH) - Codex CLI:
npm i -g @openai/codex
- WSL2 with a distro like Ubuntu.
- WSLg (for GUI support) or a running X Server.
- Linux Dependencies: Inside WSL, run:
sudo apt-get update sudo apt-get install -y nodejs npm git p7zip-full curl python3 libnss3 libatk1.0-0 libatk-bridge2.0-0 libcups2 libgtk-3-0 libasound2 libgbm1
- Codex CLI in WSL:
npm i -g @openai/codex
-
Clone and Install:
git clone <repo-url> cd codex-for-windows-wsl npm install
-
Run Environment Check:
# For Native Windows node packages/cli/bin/codex-win.js doctor # For WSL node packages/cli/bin/codex-win.js doctor --runtime wsl --wsl-distro Ubuntu
-
Run the App:
# Native Windows node packages/cli/bin/codex-win.js run # WSL (Recommends --reuse after first successful prepare) node packages/cli/bin/codex-win.js run --runtime wsl --wsl-distro Ubuntu --reuse
If Codex.dmg is not present in the working directory, prepare/run automatically downloads the latest official DMG.
codex-win doctor [--runtime <windows|wsl>] [--wsl-distro <name>]
codex-win prepare [--runtime <windows|wsl>] [--dmg <path>] [--workdir <path>] [--reuse]
codex-win launch [--runtime <windows|wsl>] [--prepare-manifest <path>] [--codex-cli <path>]
codex-win run [--runtime <windows|wsl>] [--dmg <path>] [--workdir <path>] [--reuse]
codex-win clean [--cache-only]
codex-win report --out <path-to-report.json-or.zip>Runtime options:
codex-win run --runtime windows
codex-win run --runtime wsl --wsl-distro Ubuntu
codex-win run --runtime wsl --runtime-fallback windows
codex-win run --runtime wsl --wsl-workdir /home/<user>/.codex-win/workDownload controls:
codex-win prepare --download-latest
codex-win run --no-download-latest
codex-win prepare --download-url https://persistent.oaistatic.com/codex-app-prod/Codex.dmgCreate codex-win.config.json in the project directory. Example in codex-win.config.example.json.
npm test- Not affiliated with OpenAI.
- Do not distribute proprietary Codex app binaries.
- MIT license applies to this repository code only.