Gemini CLI · September 7, 2026

Gemini CLI Account Switcher: Switch Between Accounts

A practical Gemini CLI account switcher saves each login as a named profile, keeps its~/.gemini state separate, and activates the intended profile before a new Gemini CLI session starts.

Searches for a Gemini CLI account switcher usually come from a work and personal login sharing one computer. Signing out and back in each time is slow, and it makes the active identity hard to check before opening a repository.

Save each Gemini CLI account as a named profile

Sign in through Gemini CLI's normal flow, then capture the live account. Add the next account the same way and give each profile a label that describes its boundary.

aisw init
aisw add gemini work --from-live
aisw add gemini personal
aisw list gemini

If the account uses an API key, pass it through the supported environment input rather than placing a secret in shell history. Profile names are local labels; aisw does not create provider accounts or send credentials to a cloud service.

Switch users before starting Gemini CLI

Activate the profile, inspect the result, and then start a new process. Gemini CLI keeps authentication and related local state together under ~/.gemini, so aisw switches the complete profile state instead of copying one credential file.

aisw use gemini work
aisw status
aisw verify
gemini

Use a work and personal account safely

A new terminal or editor session should start after the switch. An existing Gemini CLI process can retain its previous environment and session, so account switching is a deliberate boundary rather than a hot swap.

aisw use gemini personal
aisw verify
gemini

Bind the expected account to a repository

For client or production repositories, use a context and workspace guard so remembering to switch is not the only protection.

aisw context create client-acme --gemini acme-gemini
aisw workspace bind . --context client-acme
aisw workspace guard --mode strict

CLI or Desktop?

Use the CLI for shell hooks and repeatable scripts. Use AI Switcher Desktop when you want a visible profile list, activation controls, and diagnostics for the active Gemini state. Both interfaces use the same local profile boundary.

For command details, read How to Switch Gemini CLI Accounts. To coordinate several tools, see Switch Claude Code, Codex CLI, Gemini CLI, and Antigravity together.

Make Gemini account switching explicit

Install aisw for repeatable switching, or inspect profiles in the Desktop app.

Gemini CLI account-switching questions

Direct answers about saved profiles and Gemini's isolated local state.

How do I switch Gemini CLI accounts?

Save each login as a named aisw profile, then run aisw use gemini <profile> and aisw status before starting Gemini CLI.

Can Gemini CLI use multiple accounts on one computer?

Yes. Save the accounts as separate local profiles and activate the one needed for each session. Gemini CLI state is isolated per profile under its supported local state directory.

Does an account switcher bypass Gemini usage limits?

No. aisw manages local account state and uses the provider's normal authentication flow. It does not bypass authentication, quotas, or provider terms.