Electron + React desktop client for Codex CLI. Lets you pick model/sandbox/working dir, attach images with previews, and view raw CLI logs.
- Sends prompts via
codex exec --json(one process per message). - Model dropdown, sandbox policy dropdown, working-dir picker (remembers recent dirs).
- Image attachments with data-URL previews and remove buttons.
- CLI log panel (stdout/stderr) to debug what Codex returns.
- Dev port cleaner (5173/5175) before start.
- Node.js 18+ (20+ recommended), npm.
- Codex CLI installed (
npm i -g @openai/codexor official installer). - Codex API key or
codex login. - Windows path example:
C:\Users\<you>\AppData\Roaming\npm\node_modules\@openai\codex\vendor\x86_64-pc-windows-msvc\codex\codex.exe
cd codex-desktop
npm install
$env:CODEX_CLI_PATH="C:\Users\<you>\AppData\Roaming\npm\node_modules\@openai\codex\vendor\x86_64-pc-windows-msvc\codex\codex.exe"
# optional if not logged in:
# $env:CODEX_API_KEY="sk-..."
npm run dev- App opens via Electron, renderer on http://localhost:5175.
- Use header controls to pick model, sandbox, working dir (Browse).
- “Show log” toggles raw CLI output view.
npm run dist- Uses electron-builder; installers go to
dist/. index.htmlincludes a CSP meta for dev (allows localhost:5175, inline). For prod you can harden CSP (remove localhost/unsafe-inline) if you inline styles/scripts or add nonces.
CODEX_CLI_PATH(recommended on Windows): full path tocodexbinary.CODEX_API_KEYif you don’t usecodex login.
- Each message starts a fresh
codex exec; conversation history is not preserved. For long context, either add a PTY-based chat (requires node-pty build) or prepend history to the prompt. - CSP is dev-friendly; harden for production.
- No saved conversation history or profiles yet.
git init
git add .
git commit -m "Initial Codex Desktop"
git branch -M main
git remote add origin https://github.com/<user>/codex-desktop.git
git push -u origin main- Place your image at
docs/screenshot.png(README references it). The provided example from your run can be saved there.
