I use separate Codex accounts for personal work, company work, and client repositories. The recurring problem was simple: before opening a repository, I needed to know which account Codex Desktop was using and how much weekly usage that account had left.
OpenAI provides account switching for ChatGPT on the web, while its current documentation says the feature is not yet supported in Codex desktop. I built Codex Account Switcher, an open-source native macOS menu-bar app, to make that local desktop workflow explicit.
What the app does
The app keeps a small library of authorized local Codex profiles. From the menu bar, I can:
- identify the active personal, work, or client profile;
- compare weekly usage and reset times;
- select a different profile and confirm the switch;
- reopen Codex Desktop with the selected authentication;
- start a new Codex CLI process that uses the same selected profile.
The current release is free, MIT-licensed, and built for Apple Silicon Macs running macOS 14 or later.
The architecture stays local
Codex reads file-based authentication from the active CODEX_HOME. OpenAI's public Codex source shows the file backend reading and writing auth.json beneath that directory and applying user-only file permissions on Unix systems.
The switcher stores each saved identity in an independent profile directory. A confirmed switch follows a short sequence:
- Save the current profile's latest credentials.
- Activate the selected profile.
- Verify the selected identity.
- Reopen Codex Desktop.
Existing CLI processes keep the state they already loaded. A newly started CLI process reads the selected authentication.
There is no model-traffic proxy, cloud credential sync, automatic account rotation, account sharing, or usage-limit bypass. The app only manages local profiles for accounts the user owns or is authorized to access.
Why I avoided a background routing service
A proxy would add another trust boundary around credentials and model traffic. It would also make a straightforward local state transition much harder to inspect.
The native implementation is deliberately small: SwiftUI for the interface, local profile directories for storage, and one visible confirmation before changing the active profile. The source is public, including the account store, switch service, tests, packaging scripts, and system design.
Shipping a DMG other Mac users can open
The packaging work took longer than the account switch itself. The public v0.1.4 release now has:
- a native application and Finder icon;
- Developer ID signing for the app;
- Apple notarization and stapling before DMG creation;
- Developer ID signing, notarization, and stapling for the DMG;
- a SHA-256 checksum next to the download.
That gives users the normal macOS installation flow: download the DMG, drag the app to Applications, and open it without disabling Gatekeeper.
What I learned
The most important product decision was to keep the active identity visible before the user opens the next repository. Speed matters, but avoiding work in the wrong personal, company, or client context matters more.
The second lesson was that profile switching and session switching are different. Replacing a file on disk does not retroactively change authentication already loaded by a running process. The UI and documentation now state that existing CLI processes keep their state and new processes use the selected profile.
Try it or inspect the source
I am Zhao Liu, GitHub username liuzhao1225, and I created and maintain this project.
- Official repository: liuzhao1225/codex-account-switcher
- Signed macOS release: GitHub Releases
- Verified project facts and primary sources: Official project identity
- Source-backed guide: What is a Codex account?
- OpenAI account-switching support boundary: OpenAI Help Center
- Upstream auth storage source: openai/codex auth storage
Feedback on the profile model, usage display, and Desktop/CLI handoff is welcome. Please keep real auth.json files, tokens, email addresses, and private screenshots out of public issues.

Top comments (0)