Where Does Gemini CLI Store Settings?
Gemini CLI settings and auth folder in home .gemini directory.
Last updated
Gemini CLI keeps settings, OAuth tokens and session data in a .gemini folder in your home directory, with per-project GEMINI.md files steering behavior locally. Deleting the folder logs you out everywhere.
Back up settings.json, never oauth_creds.json, into dotfiles. Tokens refresh themselves; leaked ones invite abuse instead.
Where Gemini CLI stores this, by platform
%USERPROFILE%\.gemini
Holds settings.json, oauth_creds.json and session state. Project GEMINI.md files in repos add local instructions. Copy settings only, keep credentials private.
~/.gemini
Same home-folder layout with settings and auth side by side. Per-project GEMINI.md files override globals per directory.
~/.gemini
Home config folder independent of XDG. Extensions and MCP servers register through settings.json inside.
Frequently asked questions
How do I log out of Gemini CLI everywhere?
Delete oauth_creds.json in the folder above. Next run starts a fresh Google auth flow.
Project or global settings for Gemini CLI?
Globals live in settings.json above; GEMINI.md in each repo adds project context. Both load, project steering wins ties.
Notice an outdated path? Let us know.