Account manager for ChatGPT Desktop
Relay switches accounts in ~/.codex with encrypted profiles and automatic failover
Download • Features • How it works • Security • Development
Relay is a desktop application for Windows, macOS, and Linux. It helps you manage multiple ChatGPT and Codex accounts. You can switch between accounts in two seconds. You do not edit configuration files manually.
The application encrypts stored credentials on your computer.
It saves each account state in ~/.codex.
It switches the active profile and restarts the desktop application.
Note
The application contains no telemetry and no analytics.
Credentials stay on your computer.
The application connects only to the OpenAI endpoints auth.openai.com and chatgpt.com.
- Install the desktop application for OpenAI Codex. On Windows, the package name is
OpenAI.Codex. The process name isChatGPT.exeorCodex.exe. - Install Node.js 22 or later if you build the project from source code.
This application manages Codex agent sessions and quotas. It does not manage chat history on the ChatGPT web site.
Download the installer for your platform from the Releases page:
| Platform | Package |
|---|---|
| Windows | Relay-Setup-x.x.x.exe (NSIS installer) or Relay x.x.x.exe (portable) |
| macOS | Relay-x.x.x.dmg |
| Linux | relay_x.x.x.deb or relay-x.x.x.tar.gz |
The application searches for updates when it starts. You can also search for updates on the Settings page. The application does not install updates silently in the background.
Important
Linux: Encrypted authentication storage requires the package libsecret-1.
On Debian and Ubuntu, run sudo apt install libsecret-1-0.
If no system keyring is available, enter a session passphrase (AES-256-GCM) when the prompt appears.
- Account switch: Relay decrypts the target profile, writes files into
~/.codex, closes the desktop application, and starts it again. - Quota status monitor: Relay refreshes account quotas at regular intervals (default: 20 minutes). The monitor shows five-hour, weekly, monthly, and credit limits.
- Automatic failover switch: When the active quota drops below a threshold (default: 10%), Relay selects the ready account with the highest quota.
- Automatic token refresh: Relay refreshes an expired access token before an account switch if a refresh token is available.
- Login capture: Relay opens the web browser login page, captures authentication files, and saves a new profile.
- Profile export and import: Export and import all profiles in an encrypted JSON file with a passphrase.
- Single-instance lock: Relay focuses the active window if you open the application again. This lock prevents duplicate tray icons.
- System tray integration: You can switch accounts and monitor quotas from the system tray. The application minimizes to the tray when you close the window.
- System notifications: Relay shows alerts for low quotas and restored access on Windows and macOS.
- Color theme: Relay follows the operating system theme or your selection in Settings.
Relay stores profiles in the application data directory. When you switch an account, Relay completes these steps:
- Closes the desktop application processes (
ChatGPT.exeorCodex). - Saves the managed files of the active account in its profile folder.
- Copies the authentication, configuration, and state files of the target profile into
~/.codex. - Starts the desktop application again.
| Swapped per profile | Shared on the computer |
|---|---|
auth.json, profiles/, profiles.json, cap_sid |
Conversation databases (state_5.sqlite*) |
config.toml, hooks, rules, agents, memories |
sessions/ folder and session index |
Profile UI state (.codex-global-state.json)* |
Cache, installation ID, model list |
* Relay merges global state fields such as local projects, workspaces, and active plugins across accounts.
Relay does not separate conversation history for each account. Codex stores all threads in shared database files. If Relay replaces these database files, the replacement damages thread history.
Threat model: A local attacker with file system access, or a compromised renderer process.
- Encryption at rest: Authentication files use Electron
safeStorage(Windows DPAPI, macOS Keychain, or Linux libsecret). Files have theCMENC1:prefix. - Passphrase fallback: If no operating system keychain is available, Relay encrypts authentication files with AES-256-GCM (
CMPWD1:). You enter a session passphrase at startup. - Fail-safe default: If no keychain or passphrase is available, Relay does not write credentials in plain text.
- Hardened renderer: The renderer uses
contextIsolationandsandbox. It does not expose Node.js APIs. IPC accepts messages only from trusted application frames. - Restricted network access: Relay connects only to
auth.openai.com(token refresh) andchatgpt.com(quota status).
Caution
Protect your export files and passphrases. Export files contain account tokens. Always use a strong passphrase to encrypt export files.
If you find a security vulnerability, do not open a public issue.
Send an email with details and reproduction steps to arkucrypto@gmail.com.
OpenAI can change binary names and package structures. Relay supports these names:
- Process names:
ChatGPT,Codex,codex - MSIX package names:
OpenAI.CodexandOpenAI.ChatGPT - Session directory:
~/.codex
If an update changes process names or paths, account switch operations can stop. Open an issue on GitHub with your operating system name, application version, and the active process list.
Prerequisites: Node.js 22 or later, and npm 10 or later.
git clone https://github.com/ark-daemon/relay.git
cd relay
npm install
# Run test suite
npm test
# Build files and start the application
npm start
# Package installer files
npm run dist # Windows: NSIS installer and portable file
npm run dist:mac # macOS: DMG file
npm run dist:linux # Linux: DEB and TAR.GZ filesContinuous integration builds installers on each git push.
When you push a version tag (v*), the release workflow creates a GitHub Release.
electron/ # Main process
├── main.ts # Window, tray, IPC, auto-update
├── preload.cts # Typed context bridge
└── services/ # Profiles, auth, switch, usage, process, paths
src/ # React user interface
tests/ # Unit and integration tests
scripts/ # Build scripts and asset helpers
| Platform | Directory path |
|---|---|
| Windows | %LOCALAPPDATA%\Relay\ |
| macOS | ~/Library/Application Support/Relay/ |
| Linux | ~/.config/Relay/ |
Active Codex session files stay in ~/.codex.
Relay manages these files during an account switch.
This directory is different from the Relay data directory.