Skip to content

Support boolean types when configuring settings.json via environment variables #25573

@midnight-wonderer

Description

@midnight-wonderer

What would you like to be added?

Hi,
About this feature:
https://geminicli.com/docs/reference/configuration/#environment-variables-and-env-files

Could you make it support casting the strings "true" and "false" to booleans?

Right now it says:

Error in: ui.autoThemeSwitching
Expected boolean, received string

When I set this value:

"autoThemeSwitching": "${GEMINI_AUTO_THEME:-true}"

Why is this needed?

I want to set the autoThemeSwitching flag via environment variables.
This is because Gemini CLI wrongly identifies my shell as light when it is actually dark.
And I can't rely on a static value, such as setting autoThemeSwitching to false, because I have multiple VTEs, some dark and some light.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/coreIssues related to User Interface, OS Support, Core Functionalityhelp wantedWe will accept PRs from all issues marked as "help wanted". Thanks for your support!type/feature
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions