Codex CLI · Tested with aisw v0.3.7 · Updated July 16, 2026
How to Switch Codex CLI Accounts
Save each Codex CLI account as an aisw profile, then run aisw use codex <profile> to switch. aisw writes the profile's credentials to the same auth.json or keyring entry Codex CLI already uses, so there's no manual file copying involved.
Codex CLI keeps one active account in auth.json or a system keyring, with no built-in concept of saved, named accounts. Switching normally means manually backing up and restoring that file. aisw wraps that process in a single command.
Before you start
Install aisw if you haven’t already:
brew tap burakdede/tap && brew install aiswCLI method
1. Capture the account you’re currently signed into.
aisw initaisw add codex work --from-live2. Add a second account.
Interactively, using Codex CLI’s own OAuth flow:
aisw add codex personalOr from an API key already in your environment:
aisw add codex ci --from-env3. Switch between them.
aisw use codex workaisw use codex personal4. Confirm which account is active.
aisw statusDesktop method (coming soon)
AI Switcher Desktop is currently in private testing and not yet available for public download. The steps below reflect the current build; use the CLI method above until it ships.
Screenshot placeholder
AI Switcher Desktop Overview screen with the Codex CLI column showing two saved profiles and an active-state badge
- Open AI Switcher Desktop and go to Overview.
- In the Codex CLI column, select the profile you want active and click Activate.
- Or press ⌘K for Quick Switch and type the profile name.
Common problems
If aisw add codex <name> --from-live fails to read the current credentials, Codex CLI may be using a keyring backend aisw doesn’t have permission to read yet — re-run the command after granting keyring access when your OS prompts for it. For anything else, aisw doctor diagnoses common environment issues.
Frequently asked questions
Where does Codex CLI store credentials that aisw manages?
Depending on your install, Codex CLI stores credentials in auth.json or in a system keyring. aisw detects which one your install uses and writes profiles to that same location.
Can aisw import a Codex CLI account I'm already signed into?
Yes, where the credential file is readable. Use aisw add codex <name> --from-live to capture the account that's currently active.