Codex CLI · Tested with aisw v0.3.7 · Updated July 16, 2026
Manage Multiple Codex CLI Accounts
Add each Codex CLI account as a separate aisw profile with aisw add codex <name>. List them with aisw list codex, rename with aisw rename, and remove ones you don't need with aisw remove — aisw keeps as many named accounts as you have profiles for.
Freelancers and consultants often end up with more than two Codex CLI accounts — a personal one plus one per client. aisw treats every account as an independent named profile, so managing five accounts isn’t meaningfully harder than managing two.
CLI method
1. Add each account as you get access to it.
aisw add codex personal --from-liveaisw add codex client-a --api-key "$CLIENT_A_OPENAI_KEY"aisw add codex client-b --api-key "$CLIENT_B_OPENAI_KEY"2. List everything you’ve saved.
aisw list codexAdd --json for machine-readable output if you’re scripting against it.
3. Rename a profile if the label no longer fits.
aisw rename codex client-a acme-corp4. Remove a profile you no longer need.
aisw remove codex old-client --yesThis deletes the stored credential; it does not affect the account on OpenAI’s side.
5. Switch between any of them.
aisw use codex acme-corpLabeling profiles for clarity
Use --label when adding a profile to attach a human-readable description shown in aisw list and aisw status, separate from the profile name itself:
aisw add codex acme-corp --label "Acme Corp — contract through Dec 2026"Verify the result
aisw list codex --jsonConfirm every account you expect shows up with the right label and no duplicates.
Frequently asked questions
Is there a limit to how many Codex CLI profiles I can save?
No hard limit. Profiles are lightweight local records, so managing five or ten accounts works the same as managing two.
Can I use API keys for some accounts and OAuth for others?
Yes. Each profile records its own authentication method, so a mix of API-key and OAuth profiles under the same tool is normal.