Launch isolated OpenAI Codex desktop profiles from the terminal on macOS.
Codex desktop already supports a normal new window with Cmd+Shift+N. Use that
if you only need another window in the same app profile. codex-window is for a
different workflow: starting Codex windows from the shell with separate Electron
user data directories, named profiles, per-profile logs, and repeatable launch
commands.
cw frontend
cw backend
cw 3Requirements:
- macOS
- OpenAI Codex desktop app installed at
/Applications/Codex.app - zsh
Install from GitHub:
git clone https://github.com/Siwoo4985/codex-window.git
cd codex-window
./scripts/installThe installer creates these symlinks in ~/.local/bin:
codex-window
cw
If your shell cannot find cw, add ~/.local/bin to your PATH.
Open one generated isolated profile:
cwOpen several generated isolated profiles:
cw 3Open one named isolated profile:
cw frontend
cw --name docsPass arguments to Codex after --:
cw frontend -- ~/Projects/my-appUse the long command if you prefer:
codex-window 3Use Codex's built-in Cmd+Shift+N when:
- you just want another normal Codex window
- you want the same login, cache, and local app state
- you prefer the app UI over a terminal workflow
Use codex-window when:
- you want named profiles like
frontend,backend, ordocs - you want profile data and logs separated by project
- you want to launch several Codex profiles from the terminal
- you want a dry run of the exact
opencommand before launching
cw [count] [-- extra Codex args...]
cw --count <count> [-- extra Codex args...]
cw --name <profile> [-- extra Codex args...]
cw --profile <profile> [-- extra Codex args...]
Options:
-c, --count <count> Open this many generated profiles.
-n, --name <profile> Open one named profile.
--profile <profile> Alias for --name.
--slot <count> Compatibility alias for --count.
--app <path> Codex.app path. Default: /Applications/Codex.app
--profile-root <dir> Profile root directory.
--dry-run Print launch commands without opening windows.
-h, --help Show help.
--version Show version.
By default, profile data and logs are stored in:
~/Library/Application Support/Codex-Window/
Generated profiles use names like window-1, window-2, and window-3.
Named profiles use the name you pass, such as frontend or docs.
Override the profile root:
CODEX_WINDOW_PROFILE_ROOT="$HOME/.codex-window-profiles" cw 2Override the Codex app path:
CODEX_WINDOW_APP="/Applications/Codex Canary.app" cw 2Codex desktop is an Electron app. codex-window launches it with a separate
profile directory:
CODEX_ELECTRON_USER_DATA_PATH=<profile-dir>
open -n /Applications/Codex.app
Each profile gets its own Electron user data path. That separates local app state such as cookies, cache, storage, and logs from the default Codex profile.
Check what would be launched without opening Codex:
cw --dry-run 2If cw is not found, run:
echo $PATHand make sure ~/.local/bin is included.
If Codex is installed somewhere else:
cw --app "/path/to/Codex.app" 2- This project is macOS-only.
- This project is not affiliated with OpenAI.
- A new isolated profile may need its own login, depending on your Codex auth state.
- Running many Codex profiles can start many helper/app-server processes and use significant memory.
- openai/codex#12773 tracks native macOS multi-window support for the Codex desktop app.
- Lampese/codex-switcher manages multiple Codex CLI accounts.
- vaportail/codex-windows-updater is an unofficial Windows installer/updater for Codex.
Run syntax checks:
zsh -n bin/codex-window scripts/installPreview generated launch commands:
bin/codex-window --dry-run 2MIT