Config File Locator

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.

  1. Project level

    Project overrides

    Settings for this project. Run commands from the project root.

    Config file location
    <project>/.gemini/settings.json
    The file or its parent directory may not exist until you create project settings.
    Commands
    vi "./.gemini/settings.json"
  2. User level

    User defaults

    Applies across projects. GEMINI_CLI_HOME changes the home root used for the .gemini directory.

    Config file location
    ~/.gemini/settings.json
    Default when GEMINI_CLI_HOME is unset. The first command edits this file.
    $GEMINI_CLI_HOME/.gemini/settings.json
    Used 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.
    Commands
    vi "$HOME/.gemini/settings.json"
    vi "$GEMINI_CLI_HOME/.gemini/settings.json"

Official Gemini CLI documentation