Model or dataset
Lampese/codex-switcher avatar
Lampese/codex-switcher

Codex Switcher: A Tauri Desktop App for Rotating Codex CLI Accounts

A Desktop Application for Managing Multiple OpenAI Codex CLI Accounts

786 stars140 forksRustLicense varies

At a glance

What is it?
Codex Switcher manages multiple OpenAI Codex CLI logins from a tray app, with usage stats, warm-up scheduling and token-safe switching. It is a convenience tool for people running several accounts, and its main risk lives in the auth.json file it rewrites.
Who is it for?
Adopt Codex Switcher if you already juggle several Codex CLI logins and want switching, usage stats and warm-up scheduling in one tray app, and you accept that release builds are not Apple-notarized on macOS. Skip it if you run a single account, or if you cannot tolerate a tool rewriting ~/.codex/auth.json while Codex or ChatGPT is open.
Can I use it commercially?
Not without permission. GitHub finds no licence file in the repository, and without a licence all rights are reserved by default: you may read the code but not reuse it. Check the README, or ask the authors, before using it.
Is it still maintained?
Yes. The repository last received commits 1 day ago.
What is it written in?
Mainly Rust, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 15, 2026, and from our analysis. They are not legal advice.

DEEP OPEN-SOURCE ANALYSIS

The multi-login problem Codex Switcher addresses

The Codex CLI keeps its credentials in a single file, ~/.codex/auth.json. One file means one active account. Anyone who rotates between a personal login and a work login, or between accounts on different plans, ends up moving that file by hand or signing in again each time. Codex Switcher is a desktop application built for exactly that chore: the README describes it as "A Desktop Application for Managing Multiple OpenAI Codex Accounts" and lists add, rename, mask, import, export and switch as the account operations. The audience is narrow but real. If you run one Codex account, the app has nothing to do for you. If you run three, the tray menu is the point.

Tauri shell, Rust backend, shared frontend

The repository is Rust first, with a Tauri shell wrapping a web frontend. The README's build section asks for Node.js v18 or later, pnpm and Rust, which fits the Tauri model: a Rust process in src-tauri and a frontend built and bundled alongside it. The same frontend is also served over HTTP. Running pnpm lan builds the frontend and starts a web server on 0.0.0.0:3210, with CODEX_SWITCHER_WEB_HOST and CODEX_SWITCHER_WEB_PORT as overrides. That browser mode exposes the same backend actions through /api/invoke/*, so the app can be driven from another machine on a LAN or over Tailscale. This is the most interesting architectural detail in the material. The desktop shell and the browser dashboard are two frontends over one set of backend calls, and the README states the browser mode is usable over a remote host tunnel "when you expose the chosen port safely." That caveat is doing a lot of work: an HTTP endpoint that can add accounts and trigger switches is not something to leave open.

How switching preserves rotated OAuth sessions

The safe-switching section is the most specific part of the documentation, and it describes a real failure mode. ChatGPT can replace an OAuth refresh token after use, and the older token may then be rejected. Codex Switcher's answer is to save the latest tokens from the currently active account before it writes another account into ~/.codex/auth.json, so switching back restores the current session rather than a stale snapshot. Token refreshes and switches are serialized so a background refresh cannot land late and overwrite the account you just picked. The app also avoids refreshing the active account while Codex or ChatGPT is running, and the README tells you to close the running app before switching. There is a recovery path for damage already done: if an older version of the app saved an invalid refresh token, sign in to that account again or remove and re-add it, because an invalidated token cannot be recovered locally. That sentence is an admission that earlier releases could break a session, and it is worth reading before you trust a fresh install with an account you care about.

Usage stats, reset credits and the warm-up scheduler

Two kinds of usage data appear in the interface. Rate limits show the current 5-hour and weekly windows, remaining percentage, reset timing, credit balance and subscription expiry. Usage Stats, available for ChatGPT OAuth accounts, expands into lifetime tokens, today, last 7 days, last 30 days, streaks, longest task, token activity, reasoning insights and most-used integrations. Manual reset credits appear as a badge next to the plan badge, with the closest expiry highlighted, hidden when the count is zero, amber within 10 days of expiry and red within 3. Warm-up is the scheduling feature: it sends one minimal request so an account's current usage window has activity before you need it. It can run manually for one account or all, after each 5-hour reset when the weekly limit is not exhausted, or at specific scheduled times of day. The README text is truncated mid-sentence in the automatic warm-up description, so the exact conditions for the weekly-limit check are not fully spelled out in the supplied material.

Installation, platform quirks and the quarantine command

Prebuilt packages cover macOS (aarch64 and x64 DMG), Windows (x64 setup exe and MSI) and Linux (deb, AppImage, RPM). The macOS note is blunt: current release builds are not Apple-notarized, and macOS may report the app as damaged. The documented fix is to move it to /Applications, strip the quarantine attribute with sudo xattr -dr com.apple.quarantine "/Applications/Codex Switcher.app" and open it. Building from source follows the usual Tauri sequence: git clone, pnpm install, pnpm tauri dev, pnpm tauri build, with output under src-tauri/target/release/bundle/. Windows has a documented trap: the pnpm tauri script runs through a POSIX shell wrapper, sh ./scripts/tauri.sh, which does not work in PowerShell or CMD. Windows builders are told to use pnpm tauri:win dev and pnpm tauri:win build instead. Updates are checked against the latest GitHub release on startup, and the app can install a newer signed package from inside itself.

Where the design gets in your way

The switching model depends on cooperation from the user. The README says the app avoids refreshing the active account while Codex or ChatGPT is running, and instructs you to close the running app before switching. There is a Blocked Switch Recovery feature that detects running Codex sessions and offers a force-close flow before retrying, which softens the constraint but does not remove it: you are still managing process lifetimes by hand. The browser dashboard is a second sharp edge. Serving the same account-management actions over /api/invoke/* on port 3210 is convenient for a remote host, and it is also an interface that can add accounts and trigger switches if reachable by someone else. The README's own phrasing, "when you expose the chosen port safely," puts the responsibility on you. Finally, the material does not state a licence. For a tool that stores OAuth tokens, that gap matters more than it would for a formatting utility, and it is the first thing to resolve before depending on it.

How it differs from editing auth.json yourself

The obvious alternative is manual file management: copy ~/.codex/auth.json to a backup per account and swap the file when you want to change logins. That approach has no dependencies, no background process and no HTTP surface. It also has none of the token-rotation protection described above, no serialization of refreshes against switches, no usage stats, no reset-credit badges and no warm-up scheduling. The difference is not cosmetic. Codex Switcher's stated reason for existing is that a naive copy-and-swap can restore a refresh token that ChatGPT has already replaced, producing a login that fails until you sign in again. If you only switch rarely and are willing to re-authenticate, the manual route is simpler and has a smaller attack surface. If you switch several times a day and want the 5-hour and weekly windows visible without opening a browser, the app is doing work that a shell alias cannot.

Maintenance cost and what to verify first

Release cadence in the supplied material is high: v0.2.13, v0.2.14 and v0.2.15 landed between 6 and 9 September 2026, with the last push on the same day as v0.2.15. Frequent point releases in a 0.2.x line suggest active churn rather than a settled interface, so budget for updating. The in-app updater reduces that cost, but only for signed packages, and the macOS build carries the notarization caveat above. Licence terms are unknown from the material, so redistribution and commercial use cannot be assessed here; check the repository before bundling it into anything. For a first evaluation, install a release, add one account you can afford to re-authenticate, switch away and back, and confirm the session still works. The README's own recovery instruction, that an invalidated token cannot be recovered locally, is the boundary to test against.

Editorial conclusion

Adopt Codex Switcher if you already juggle several Codex CLI logins and want switching, usage stats and warm-up scheduling in one tray app, and you accept that release builds are not Apple-notarized on macOS. Skip it if you run a single account, or if you cannot tolerate a tool rewriting ~/.codex/auth.json while Codex or ChatGPT is open. Before trusting it with a paid account, verify the licence, confirm the release you download is a signed package from the project's own releases page, and test the switch on a throwaway login first.

Official sources

  1. Issues
  2. Lampese/codex-switcher on GitHub
  3. README
  4. Releases
Community notes

Community notes