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:

Terminal window
brew tap burakdede/tap && brew install aisw

CLI method

1. Capture the account you’re currently signed into.

Terminal window
aisw init
aisw add gemini work --from-live

2. Add a second account.

Terminal window
aisw add gemini personal

Or with an API key:

Terminal window
aisw add gemini personal --api-key "$GEMINI_API_KEY"

3. Switch between them.

Terminal window
aisw use gemini work
aisw use gemini personal

4. Confirm the active profile.

Terminal window
aisw status

Desktop 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.

  1. Open AI Switcher Desktop and go to Overview.
  2. In the Gemini CLI column, select the profile you want and click Activate.
  3. 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.