Skip to content

Siwoo4985/codex-window

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

codex-window

macOS zsh License: MIT

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 3

Install

Requirements:

  • 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/install

The installer creates these symlinks in ~/.local/bin:

codex-window
cw

If your shell cannot find cw, add ~/.local/bin to your PATH.

Use

Open one generated isolated profile:

cw

Open several generated isolated profiles:

cw 3

Open one named isolated profile:

cw frontend
cw --name docs

Pass arguments to Codex after --:

cw frontend -- ~/Projects/my-app

Use the long command if you prefer:

codex-window 3

When To Use This

Use 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, or docs
  • 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 open command before launching

Command Reference

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.

Profiles And Logs

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 2

Override the Codex app path:

CODEX_WINDOW_APP="/Applications/Codex Canary.app" cw 2

How It Works

Codex 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.

Troubleshooting

Check what would be launched without opening Codex:

cw --dry-run 2

If cw is not found, run:

echo $PATH

and make sure ~/.local/bin is included.

If Codex is installed somewhere else:

cw --app "/path/to/Codex.app" 2

Notes

  • 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.

Related Work

Development

Run syntax checks:

zsh -n bin/codex-window scripts/install

Preview generated launch commands:

bin/codex-window --dry-run 2

License

MIT

About

Tiny macOS launcher for isolated OpenAI Codex desktop profiles from the terminal.

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages