Gemini CLI config file locations
Find Gemini CLI user and project settings file locations on macOS, Linux, and Windows.
This page covers Gemini CLI user and project settings. Settings files are merged: system overrides take precedence over project settings, then user settings, then system defaults. When folder trust is enabled, project settings are ignored in untrusted folders. Applicable environment variables and launch arguments can also override settings. GEMINI_CLI_HOME changes the home root; the .gemini directory remains part of the path.
Project level
Project overridesSettings for this project. Replace <project> with the project root.
Config file location
The file or its parent directory may not exist until you create project settings.<project>/.gemini/settings.jsonCommands
vi "<project>/.gemini/settings.json"User level
User defaultsApplies across projects. GEMINI_CLI_HOME changes the home root used for the .gemini directory.
Config file location
Default when GEMINI_CLI_HOME is unset. The first command edits this file.~/.gemini/settings.jsonUsed instead when GEMINI_CLI_HOME is set. Use the second command only when this variable points to your configuration location. These are alternative paths for the same user settings.$GEMINI_CLI_HOME/.gemini/settings.jsonCommands
vi "$HOME/.gemini/settings.json"vi "$GEMINI_CLI_HOME/.gemini/settings.json"
Official Gemini CLI documentation