> configuration

Configuration lives in layered settings.json files plus environment variables. The order, highest wins, is CLI flags and env vars, then system, project, and user settings, then built-in defaults. Personal preferences belong in ~/.gemini/settings.json; shared team config goes in a committed .gemini/settings.json in the project.

// configuration

5 commands

// faq

Where is the Gemini CLI settings.json file?

User settings are at ~/.gemini/settings.json and project settings at .gemini/settings.json in the repo root; system files live under /etc/gemini-cli/ (Linux) or the platform equivalent. Project settings override user settings, and environment variables and CLI flags override both. Edit visually with /settings.

How do I change the default model permanently?

Set model.name in settings.json to an alias (auto, pro, flash) or a full model id, or export the GEMINI_MODEL environment variable. Because env vars override settings files, a leftover GEMINI_MODEL export will win over what you put in the file.

Does Gemini CLI load .env files?

Yes. It searches for .env from the working directory upward to the repo root, then the home directory. DEBUG and DEBUG_MODE are excluded from project .env files by default so a repo cannot force verbose logging on you — put those in .gemini/.env if you want them loaded.

How do I stop Gemini CLI from collecting usage data?

Set privacy.usageStatisticsEnabled to false in settings.json. Developer telemetry is separate and off by default (GEMINI_TELEMETRY_ENABLED). Note that free-tier login and API-key usage may still be used to improve products under those terms; Vertex AI is the path that keeps prompts out of product improvement.