Gemini CLI · Tested with aisw v0.3.7 · Updated July 16, 2026
How to Switch Gemini CLI Accounts
Save each Gemini CLI account as an aisw profile, then switch with aisw use gemini <profile>. Gemini CLI keeps authentication and local state together under ~/.gemini, so aisw always switches the full isolated state for that profile, not just a credential file.
Gemini CLI keeps its credentials and local configuration together under ~/.gemini, so switching accounts by hand means backing up and swapping that whole directory. aisw does this as one profile switch.
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 gemini work --from-live2. Add a second account.
aisw add gemini personalOr with an API key:
aisw add gemini personal --api-key "$GEMINI_API_KEY"3. Switch between them.
aisw use gemini workaisw use gemini personal4. Confirm the active profile.
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 Gemini CLI column showing an isolated-state badge next to the active profile
- Open AI Switcher Desktop and go to Overview.
- In the Gemini CLI column, select the profile you want and click Activate.
- The state-mode badge always reads Isolated for Gemini — this is expected.
Common problems
If aisw add gemini <name> --from-live reports nothing to import, confirm Gemini CLI has actually completed a sign-in first — aisw can only capture credentials that already exist on disk.
Frequently asked questions
Why does Gemini CLI behave differently from Claude Code and Codex CLI here?
Claude Code and Codex CLI let aisw switch just the credentials while keeping other local configuration shared, if you want. Gemini CLI stores everything together under ~/.gemini, so a profile switch always moves the complete isolated state — there's no shared-state option for Gemini.
Does that make Gemini CLI switching slower?
No — it's still one command and happens locally. The difference is architectural (what gets swapped), not a performance one.