Gemini CLI config file locations
Commands use a POSIX shell (macOS, Linux, or WSL). Install the named editor or CLI first. Before using an environment-variable path, check that the variable is set to a non-empty, intended path. When using vi or Notepad, ensure the parent directory exists and is writable. A missing file is created when you save it; Notepad may ask to create it.
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. Run commands from 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 "./.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