Skip to content

euforicio/Codexer

Repository files navigation

Codexer

Codexer is a native macOS profile manager for running multiple isolated instances of the OpenAI Codex desktop app at the same time. It is built for the common personal/work-account case: create a profile for each account, launch Codex from that profile, and optionally install a Dock-pinnable shortcut for quick access.

Codexer does not modify /Applications/Codex.app, ~/.codex, or existing Codex authentication files. Each profile gets its own local state directory.

Features

  • Add and remove Codex profiles from a SwiftUI macOS app.
  • Launch multiple Codex instances side by side with separate state.
  • View per-profile session totals, weekly activity, Codex usage-limit windows, job status, log warnings/errors, last activity, and local storage use.
  • Install profile-specific .app shortcuts in ~/Applications/Codexer/.
  • Use native arm64 shortcut launchers, avoiding Rosetta prompts.
  • Remove shortcuts without deleting profile data.
  • Remove a profile from Codexer while preserving its data.
  • Delete profile data only through a separate destructive confirmation.
  • Restore a previously removed profile by selecting its profile data folder.

How It Works

Codexer launches the official Codex app with profile-specific paths:

/usr/bin/open -n /Applications/Codex.app \
  --env CODEX_HOME=<profile>/CODEX_HOME \
  --args --user-data-dir=<profile>/ElectronUserData

This isolates:

  • Codex CLI/app-server config and auth state through CODEX_HOME.
  • Electron/browser state through --user-data-dir.
  • Local profile data under Codexer-owned folders.

Codexer intentionally does not override HOME, so Codex agents can still use your normal shell, git config, SSH keys, project files, and developer tools.

Storage Layout

Codexer stores profile metadata here:

~/Library/Application Support/Codexer/profiles.json

Each profile stores isolated state here:

~/Library/Application Support/Codexer/Profiles/<profile-slug>/
  CODEX_HOME/
  ElectronUserData/

Profile shortcuts are installed here:

~/Applications/Codexer/<Profile Name>.app

Duplicate profile names are given numbered shortcut names, such as Personal.app and Personal 2.app.

Shortcut Behavior

Installed shortcuts are real macOS .app bundles. Each shortcut contains:

  • Contents/MacOS/CodexerShortcutLauncher: a native Swift launcher executable.
  • Contents/Resources/ShortcutConfig.plist: the profile-specific launch paths.
  • Contents/Info.plist: profile-specific bundle name and display name.
  • Contents/Resources/ProfileIcon.icns: a generated profile-color icon.

Shortcuts use the profile name as their app name. For example, a profile named Work installs as:

~/Applications/Codexer/Work.app

The running OpenAI Codex window may still identify itself as Codex, because Codexer launches the official signed Codex.app without modifying it.

Requirements

  • macOS 13 or newer.
  • Swift 5.9 or newer.
  • The official Codex desktop app installed at /Applications/Codex.app.

If Codex is installed elsewhere, use the app's Select Codex.app action to point Codexer at the correct bundle.

Build And Run

Build and launch the app bundle:

./script/build_and_run.sh

Build, launch, and verify the process exists:

./script/build_and_run.sh --verify

The generated app bundle is written to:

dist/Codexer.app

The Codex desktop Run action is configured in:

.codex/environments/environment.toml

Tests

Run the test suite:

swift test

Run a normal SwiftPM build:

swift build

Current test coverage includes:

  • Profile creation and duplicate slug handling.
  • Rename behavior that keeps profile paths stable.
  • Safe profile removal that preserves data by default.
  • Destructive profile deletion.
  • Read-only profile status scanning from Codex state/log databases.
  • Codex usage-limit parsing for 5-hour and weekly windows from the profile's authenticated Codex app-server.
  • Isolated Codex launch command generation.
  • Native shortcut bundle generation.
  • Shortcut removal without deleting profile data.

Project Structure

Package.swift
Assets/
  AppIcon.png               Generated Codexer app icon source
  AppIcon.icns              macOS app icon used by the app bundle
Sources/
  Codexer/                  SwiftUI macOS app
  CodexerCore/              Profile, launcher, and shortcut logic
  CodexerShortcutLauncher/  Native helper copied into generated shortcuts
Tests/
  CodexerCoreTests/         Unit tests for core behavior
script/
  build_app.sh              Build dist/Codexer.app without launching it
  build_and_run.sh          Build, bundle, launch, and verify helper
  package_app.sh            Create shareable ZIP and DMG packages
.github/workflows/
  release.yml               Build/test/package workflow and tagged releases

Packaging And Releases

Create local shareable packages from an existing app bundle:

./script/build_app.sh
./script/package_app.sh

The package script writes:

dist/Codexer-<version>.zip
dist/Codexer-<version>.dmg

GitHub Actions builds and tests the app on pushes and pull requests. Pushing a tag that starts with v creates a GitHub Release and uploads the generated ZIP and DMG:

git tag v1.0.0
git push origin v1.0.0

Typical Workflow

  1. Launch Codexer.
  2. Click Add Profile.
  3. Enter a profile name such as Personal or Work.
  4. Select the profile and click Launch Codex.
  5. Sign into the desired Codex account inside that launched instance.
  6. Click Install Shortcut to create a Dock-pinnable launcher.
  7. Repeat for additional accounts.

To remove a profile safely, use Remove From List. This removes the profile from Codexer but leaves its data on disk. Use Delete Data only when you want to remove the profile's login state, Codex state, Electron data, and shortcut.

Notes And Limitations

  • Codexer relies on Codex continuing to honor CODEX_HOME and --user-data-dir.
  • Existing generated shortcuts should be reinstalled after changes to shortcut naming or launcher behavior.
  • Codexer does not copy OAuth tokens between profiles. Each profile signs in independently.
  • Codexer is not an OpenAI product and does not redistribute the Codex app.

About

A macOS launcher for isolated multi-account Codex profiles

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors