Important
🌍 Language Switch: 🇺🇸 English | 🇷🇺 Русский | 🇨🇳 简体中文
Tip
🧭 Windows-first Codex repack + launch pipeline with a Node.js orchestration core and a thin PowerShell entrypoint.
Codex-Windows repacks and runs Codex Desktop on Windows with a deterministic pipeline:
- 🧩 Extract
app.asarfromCodex.dmg - 🛠️ Apply Windows runtime patches (PATH/env/process guards/CLI resolution)
- 🔽 Inject reliable chat auto-scroll on thread switch
- 🧹 Sanitize workspace registry + maintain git capability cache
- 🧪 Validate native modules (
better-sqlite3,node-pty) - 📦 Build portable output or single-file EXE
At pipeline start, stale data in %USERPROFILE%\.codex (or %CODEX_HOME%) is cleaned by last modified time:
| Target | Rule |
|---|---|
log/ |
files older than 7 days |
sessions/ |
files older than 10 days |
worktrees/ |
roots older than 5 days (based on latest mtime inside tree) |
Note
✅ Old chats/sessions are kept if they were modified recently.
run.cmd / build.cmd
-> scripts/run.ps1
-> scripts/node/run.js
-> scripts/ts/run.ts
Important
build.cmd runs build mode with -NoLaunch by default (build only, no auto-start).
- 🪟 Windows 10/11
- 🟢 Node.js
- 🤖 Codex CLI:
npm i -g @openai/codex - 🗜️ 7-Zip (
7z) for DMG extraction and single EXE packaging
Note
- Python / Visual Studio Build Tools are not required for default flow.
scripts/ts/*= source,scripts/node/*= compiled runtime artifacts.
- Install Codex CLI:
npm i -g @openai/codex- Direct run:
run.cmd -DmgPath .\Codex.dmg- Portable build (no auto-launch):
build.cmd -DmgPath .\Codex.dmg| Scenario | Command |
|---|---|
run.cmd |
|
| ⏸️ Direct run without launch | run.cmd -NoLaunch |
| 📦 Portable build (default no launch) | build.cmd -DmgPath .\Codex.dmg |
| 🧷 Portable build + single EXE | build.cmd -DmgPath .\Codex.dmg -SingleExe |
| 🧠 Node runner (run mode) | node .\scripts\node\run.js run -DmgPath .\Codex.dmg |
| 🛠️ Node runner (build mode) | node .\scripts\node\run.js build -DmgPath .\Codex.dmg -NoLaunch |
| Option | Meaning |
|---|---|
-WorkDir .\work |
custom work directory |
-DistDir .\dist |
custom output directory |
-Reuse |
reuse reusable pipeline artifacts |
-NoLaunch |
skip application launch |
-CodexCliPath <path> |
explicit codex.exe path |
-SingleExe |
build self-extracting EXE |
-DevProfile |
use isolated dev profile |
-ProfileName <name> |
named profile isolation |
-StrictContract |
strict environment contract checks |
Branding overrides:
- 🎨
CODEX_ICON_PATH- custom.ico - 🧱
CODEX_RCEDIT_PATH- customrcedit.exe
dist\Codex-win32-x64\Codex.exe
dist\Codex-win32-x64\Launch-Codex.cmd
dist\Codex-win32-x64-single.exe (when -SingleExe is used)
- This is not an official OpenAI project.
- Do not redistribute OpenAI binaries or
Codex.dmg.