Skip to content

zlyBear/Codex-Account-Switcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Codex Account Switcher

中文文档

Codex Account Switcher is an open-source macOS menu bar utility for managing multiple Codex / ChatGPT accounts on a single machine.

It focuses on three everyday workflows:

  • save and organize multiple authenticated Codex profiles
  • switch the active profile with minimal friction
  • inspect quota usage, recovery times, and refresh status from both the dashboard and the menu bar

App Screenshot

Codex Account Switcher dashboard

Menu Bar Screenshot

Codex Account Switcher menu bar panel

Highlights

  • Native macOS app built with SwiftUI + AppKit
  • Rust bridge for secure local storage, account switching, and quota retrieval
  • Atomic replacement of ~/.codex/auth.json
  • Quota refresh from online APIs with fallback to local rate_limits snapshots
  • Background refresh for saved standby accounts
  • In-app language switching with system-following mode
  • Menu bar access for quick status checks and account switching

Project Structure

native-macos/   Native macOS application shell and UI
rust-bridge/    Rust bridge, secure storage, quota parsing, and switching logic

Requirements

  • macOS 14 or later
  • Xcode 16 or later
  • Rust stable toolchain

Development

Build the Rust bridge

cd rust-bridge
cargo build --bin codex_account_bridge

Test the Rust bridge

cd rust-bridge
cargo test

Test the Swift package

swift test --package-path native-macos/CodexAccountNativePackage

Build the macOS app

xcodebuild \
  -workspace native-macos/CodexAccountNative.xcworkspace \
  -scheme CodexAccountNative \
  -configuration Release \
  build

Security and Privacy Notes

  • This tool works with local Codex authentication state and should be used only on machines you trust.
  • Account profiles are stored locally and encrypted before being persisted by the Rust bridge.
  • The app temporarily writes the selected profile back to ~/.codex/auth.json when switching accounts.
  • No telemetry, hosted backend, or cloud sync is included in this repository.

Open Source Notes

  • Default documentation language is English.
  • A separate Simplified Chinese document is available at README.zh-CN.md.
  • The project is licensed under Apache License 2.0.

Disclaimer

This project is an independent community utility and is not affiliated with or endorsed by OpenAI.

Use it at your own risk, especially when handling production or paid accounts.

Contributing

Issues and pull requests are welcome. If you plan to change account storage, switching logic, or quota parsing, please include reproduction steps and platform details in your report.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors