gemini-cli - 💡(How to fix) Fix Support per-project local settings [2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
google-gemini/gemini-cli#25380Fetched 2026-04-15 06:45:11
View on GitHub
Comments
2
Participants
2
Timeline
7
Reactions
0
Author
Participants
Timeline (top)
labeled ×3commented ×2issue_type_added ×1unlabeled ×1
RAW_BUFFERClick to expand / collapse

What would you like to be added?

Add support for a local-only configuration file (e.g., .gemini/settings.local.json) that merges with the project-level .gemini/settings.json.

Example solution: The CLI should check for .gemini/settings.local.json and prioritize its configuration over .gemini/settings.json. This allows users to add the .local.json file to their .gitignore/global ignore while keeping shared settings in the standard config file.

Why is this needed?

Users need a way to define local-specific hooks and other machine-specific overrides that should not be committed to the shared repository.

Additional context

No response

extent analysis

TL;DR

Implement a configuration merge mechanism to prioritize settings from a local-only file, such as .gemini/settings.local.json, over the project-level .gemini/settings.json.

Guidance

  • Check for the existence of .gemini/settings.local.json in the CLI configuration loading process.
  • Merge the local configuration with the project-level configuration, giving priority to local settings.
  • Ensure that the local configuration file can be safely ignored by version control systems using .gitignore or global ignore settings.
  • Consider adding documentation to instruct users on how to use the local configuration file for machine-specific overrides.

Example

// .gemini/settings.json (project-level)
{
  "hooks": {
    "pre-commit": "echo 'Project-level hook'"
  }
}

// .gemini/settings.local.json (local-only)
{
  "hooks": {
    "pre-commit": "echo 'Local hook override'"
  }
}

In this example, the local hook override should take precedence over the project-level hook.

Notes

This solution assumes that the existing configuration loading mechanism can be extended to support the local configuration file. The exact implementation details may vary depending on the current configuration handling code.

Recommendation

Apply a workaround by implementing the configuration merge mechanism, as this will provide the necessary flexibility for users to define local-specific settings without modifying the shared project configuration.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING