Skip to content

Docs: GEMINI_CLI_HOME settings.json path is undocumented #23622

@LARIkoz

Description

@LARIkoz

What happened?

When using GEMINI_CLI_HOME to run multiple accounts, settings.json (including customAliases) is silently ignored if placed at $GEMINI_CLI_HOME/settings.json.

The correct path is $GEMINI_CLI_HOME/.gemini/settings.json — because homedir() in paths.js returns GEMINI_CLI_HOME and then getGlobalGeminiDir() appends .gemini/.

This is not documented anywhere. The enterprise docs mention GEMINI_CLI_HOME for isolation but don't explain the .gemini/ subdirectory requirement for settings.

Steps to reproduce

  1. Set up a second account: export GEMINI_CLI_HOME=~/.gemini2
  2. Copy settings: cp ~/.gemini/settings.json ~/.gemini2/settings.json
  3. Run with a customAlias model (e.g. a -long alias with maxOutputTokens)
  4. Result: ModelNotFoundError — customAliases not loaded

Expected behavior

Either:

  • Document that settings.json must be at $GEMINI_CLI_HOME/.gemini/settings.json
  • Or also look for settings.json at $GEMINI_CLI_HOME/settings.json (more intuitive)

Workaround

mkdir -p ~/.gemini2/.gemini
cp ~/.gemini/settings.json ~/.gemini2/.gemini/settings.json

Client information

  • CLI v0.34.0
  • macOS ARM64
  • Auth: OAuth (Google One AI Premium)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No fields configured for Bug.

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions