Answer: Configuration is applied in order of precedence from lowest to highest: Default values, System defaults file, User settings file, Project settings file, System settings file, Environment variables, and Command-line arguments, with lower numbers overridden by higher numbers. Status: Confirmed Entry: tool/gemini-cli/settings/configuration-precedence Revision: 1 Digest: sha256:e1453a0e17039037 (changes whenever the content changes) Timeline: Created: 2026-11-13T03:18:45Z Last changed: 2026-11-13T03:18:45Z Last verified: 2026-11-20T12:53:26Z Next check: 2026-11-21T12:53:26Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of Precedence order | 1. **Default values:** Hardcoded defaults within the application. 2. **System defaults file:** System-wide default settings that can be overridden by other settings files. 3. **User settings file:** Global settings for the current user. 4. **Project settings file:** Project-specific settings. 5. **System settings file:** System-wide settings that override all other settings files. 6. **Environment variables:** System-wide or session-specific variables, potentially loaded from `.env` files. 7. **Command-line arguments:** Values passed when launching the CLI. | [1] | 2026-11-20 Lowest precedence | Default values | [1] | 2026-11-20 Highest precedence | Command-line arguments | [1] | 2026-11-20 Sources: [1] Google. "Gemini CLI configuration". https://geminicli.com/docs/reference/configuration.md Role: primary. Accessed: 2026-11-20T12:53:26Z Quote: "Configuration is applied in the following order of precedence (lower numbers are overridden by higher numbers): 1. **Default values:** Hardcoded defaults within the application. 2. **System defaults file:** System-wide default settings that can be overridden by other settings files. 3. **User settings file:** Global settings for the current user. 4. **Project settings file:** Project-specific settings. 5. **System settings file:** System-wide settings that override all other settings files. 6. **Environment variables:** System-wide or session-specific variables, potentially loaded from `.env` files. 7. **Command-line arguments:** Values passed when launching the CLI." (Supports: Precedence order) Quote: "1. **Default values:** Hardcoded defaults within the application." (Supports: Lowest precedence) Quote: "7. **Command-line arguments:** Values passed when launching the CLI." (Supports: Highest precedence) Published: 2026-10-16T02:36:07Z Snapshot SHA-256: 4fb90004ef3e4aeb3705ceeea4ab8a0d8e0e3aa4553293a1df035990740cc9ca (captured 2026-11-13T03:18:45Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-13T03:18:45Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T12:53:26Z. No independent second source is configured for this entry Last successful check: 2026-11-20T12:53:26Z Last attempt: 2026-11-20T12:53:26Z Notes and limitations: Extracted automatically from a single official source (section "Configuration layers"). Related: https://latestn.com/tool/gemini-cli/settings/configure-hooks How do I configure hooks in Gemini CLI? https://latestn.com/tool/gemini-cli/settings/configure-hooks-settings-json How do I configure hooks in Gemini CLI's settings.json? https://latestn.com/tool/gemini-cli/settings/configure-mcp-server-settings How do I configure an MCP server in Gemini CLI's settings.json? https://latestn.com/tool/gemini-cli/settings/agent-skill-directory-location Where does Gemini CLI look for Agent Skills on disk? https://latestn.com/tool/gemini-cli/settings/change-theme How do I change the theme in Gemini CLI? https://latestn.com/tool/gemini-cli/settings/config-file-location Where are Gemini CLI configuration and settings files stored? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-13T03:18:45Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/gemini-cli/settings/configuration-precedence/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/gemini-cli/settings/configuration-precedence POST: https://latestn.com/dispute/tool/gemini-cli/settings/configuration-precedence with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/gemini-cli/settings/configuration-precedence?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). What is the precedence order of Gemini CLI configuration layers? Revision 1, last verified 2026-11-20T12:53:26Z. https://latestn.com/tool/gemini-cli/settings/configuration-precedence (accessed 2026-11-21T09:54:46Z). @misc{LatestN_tool_gemini_cli_settings_configuration_precedence_r1, title = {What is the precedence order of Gemini CLI configuration layers?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/gemini-cli/settings/configuration-precedence}}, note = {Revision 1; digest sha256:e1453a0e17039037; last verified 2026-11-20T12:53:26Z; accessed 2026-11-21T09:54:46Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/gemini-cli/settings/configuration-precedence