Gemini CLI admin controls: system settings and admin policies

What an administrator can enforce on every Gemini CLI install through the system settings file and admin policy folder, and where those controls stop.

On this page

Can admins enforce Gemini CLI controls on every install?

Yes, within limits. Gemini CLI supports admin-enforced settings through a System Overrides file, /etc/gemini-cli/settings.json on Linux, and an admin policy folder, /etc/gemini-cli/policies on Linux. Both are part of the open-source client, not a feature of a paid Gemini Code Assist edition, so the controls do not depend on which license your staff hold. The enterprise configuration documentation is explicit that these patterns should not be treated as a foolproof security boundary, because a user with local privileges may still circumvent them.

The system settings file has the final say over user and workspace settings. The controls the documentation recommends include setting security.disableYoloMode to true, using tool allowlisting instead of the deprecated excludeTools, setting mcp.allowed so the CLI does not merge and accept any MCP server a user defines, and setting tools.sandbox to docker to force tool execution into a Docker sandbox. Outbound traffic can be routed through a corporate proxy, and OpenTelemetry export can be pointed at your collector with logPrompts kept false. The policy engine documentation adds that admin policies override user and default policies, and that the folder is ignored unless it is root-owned and not writable by group or others.

Those file permissions are the control that makes the rest hold, so verify them on every machine rather than assuming a provisioning script set them. Confirm that the settings file and policy folder are owned by root, that neither is writable by group or others, and that standard users cannot replace them. Then confirm, on a test device, that a policy you set actually takes effect. Also decide how you will handle the cases the documentation does not cover, such as macOS and Windows paths, containers, and developers with administrator rights on their laptops. Ask Google and your endpoint management team to confirm how those platforms locate and protect the equivalent files before you rely on them.

Admin control support by edition and component

This table lists each admin control on Gemini CLI, whether the client itself provides it, which outside component you must run, and whether a Google plan is needed. The Google plan column is marked to confirm wherever the supplied sources do not settle the edition question. The main takeaway is that these controls are client-side settings, which Google says a user with local privileges may still circumvent, so treat them as guardrails and pair them with endpoint controls you manage.

ControlBuilt into the clientOutside component neededGoogle plan requirement
System overrides file at /etc/gemini-cli/settings.jsonYes. Takes final say over user and workspace settings and should be protected with file permissions.You place and protect the file on each machine. Confirm your central distribution method.To confirm. The source does not name the Code Assist edition.
Admin policy folder at /etc/gemini-cli/policiesYes. Admin policies override user and default policies.Policies are ignored unless the folder is root-owned and not writable by group or others. Deploy it on each host.To confirm. The source does not name the Code Assist edition.
security.disableYoloMode set to trueYes. Google calls it highly recommended in an enterprise environment.None stated in the supplied source.To confirm. The source does not name the Code Assist edition.
Tool allowlistingYes. Google recommends it over the deprecated exclusion setting.None stated in the supplied source.To confirm. The source does not name the Code Assist edition.
excludeTools (deprecated)Present but deprecated. Use tool allowlisting as the primary control.None stated in the supplied source.To confirm. The source does not name the Code Assist edition.
mcp.allowed MCP server allowlistYes. Without it, the CLI merges and allows any MCP server a user defines.None stated in the supplied source. Inventory approved servers before enforcing.To confirm. The source does not name the Code Assist edition.
Forced Docker sandbox via tools.sandbox set to dockerYes. Forces tool execution into a Docker sandbox.Docker must be installed and managed on each host you cover.To confirm. The source does not name the Code Assist edition.
Corporate proxy for outbound trafficYes. Admins can route outbound traffic through a corporate proxy.A corporate proxy you operate and maintain.To confirm. The source does not name the Code Assist edition.
OpenTelemetry export to otlpEndpoint with logPrompts falseYes. Export is configurable and logPrompts false is the recommended setting.A telemetry collector or backend you run to receive the data.To confirm. The source does not name the Code Assist edition.

How the system overrides file and admin policy folder enforce settings

The system overrides file at /etc/gemini-cli/settings.json on Linux has the final say over user and workspace settings, so it is the main place an administrator sets controls that a developer should not change. Its protection depends entirely on file permissions. Confirm that the file and its directory are owned by root and not writable by the developer account, because a user who can edit the file can change the settings that apply to their own install. Treat this file as configuration under change control: keep it in your configuration management system, deploy it through your endpoint tooling, and check it on a schedule.

Admin policies in /etc/gemini-cli/policies on Linux override user and default policies, which makes this folder the place to set tool rules that apply to every session. The CLI ignores the folder when it is not root-owned or when it is writable by group or others. That behavior is a safety check, but it also means a permissions drift can silently remove your policies rather than cause an error. Before rollout, verify ownership and mode on both the folder and each policy file, and test on a managed machine that a blocked tool call is actually blocked. Confirm the current behavior on macOS and Windows with Google's enterprise configuration guidance, since the Linux paths in this section do not carry over.

Each control is enforced at a different point. Settings such as security.disableYoloMode act in the client process. Tool allowlists and the tools.sandbox setting act at tool execution, and tools.sandbox set to docker sends tool execution into a Docker sandbox. The mcp.allowed setting governs which MCP connections the client will make. Proxy routing controls network egress, and OpenTelemetry settings such as otlpEndpoint and logPrompts control telemetry export. The residual risk is local privilege: the Google documentation states these patterns are not a foolproof security boundary, because a user with local privileges may still circumvent them. Plan compensating controls such as endpoint hardening, restricted sudo rights, and network-level egress rules outside the client.

Which settings to enforce first and why

Each of these settings closes a specific gap that a single developer's local configuration would otherwise leave open on every Gemini CLI install. Together they decide what the agent may run, which tools and MCP servers it can reach, where its traffic goes and what telemetry leaves the machine.

Disable yolo mode

Yolo mode lets Gemini CLI run tool calls without asking for approval. The enterprise configuration guidance calls setting security.disableYoloMode to true highly recommended in an enterprise environment. Set it in the system settings file so a user cannot re-enable it in their own settings. Check that approval prompts still appear for shell commands and file writes after the change.

Enterprise configuration docs

Allowlist tools instead of excludeTools

A tool allowlist names the only tools the agent may call, so new or unexpected tools stay blocked by default. The enterprise guidance recommends this approach over the deprecated excludeTools key, which blocks only what someone thought to list. Review the allowlist with the owners of each approved workflow, and confirm that the policy engine applies it to user sessions.

Restrict MCP servers with mcp.allowed

Without an mcp.allowed list, the CLI merges and allows any MCP server a user defines. That lets a developer attach a server that reads internal data or calls an external API without review. Set the list in the system settings file, limit it to servers your security team has assessed, and make sure a user-level entry cannot add servers beyond it.

Force tool execution into Docker

Setting tools.sandbox to docker forces tool execution into a Docker sandbox instead of running commands directly on the host. This limits what a shell command or file write can reach on the workstation. Confirm that Docker is installed and approved on every managed device, because the setting depends on it, and decide how users on unmanaged machines are handled.

Route traffic through a corporate proxy

The enterprise configuration lets admins route outbound traffic from Gemini CLI through a corporate proxy. This gives the security team one egress point to inspect, log and block, rather than relying on each workstation's network path. Ask the network team which proxy settings must be enforced in the system file and test that requests to model endpoints pass through it.

Export telemetry with prompt logging off

The configuration shows OpenTelemetry export to an otlpEndpoint, so the security team can receive session telemetry in its own collector. Keep logPrompts set to false, as the guidance recommends, so prompt content is not collected alongside usage data. Decide who owns the collector, how long it retains records and whether its contents fall under your data handling rules.

Enterprise configuration docs

How admin settings take precedence over user and workspace settings

The flow starts with the defaults, then user and workspace settings, which the system overrides file at /etc/gemini-cli/settings.json on Linux can override because it has the final say. Admin policies in /etc/gemini-cli/policies also override user and default policies, but only if the folder is root-owned and not writable by group or others. Check that both paths are protected with file permissions, because a user with local privileges may still circumvent these settings.

Precedence order for system, admin policy, user and workspace settings on Linux.

How the admin setup changes by environment

On a single developer workstation that IT manages, the admin files sit in a system location that the employee cannot edit. The system settings file has the final say over user and workspace settings, so it is the place to set the guardrails that should hold on every install. The Gemini CLI enterprise configuration page notes that these patterns are not a foolproof security boundary, because a user with local privileges may still circumvent them. For that reason, the main question on a managed laptop is whether the employee has administrator rights.

  • System settings file: Set the enforced values in the System Overrides file, which the enterprise configuration page gives as /etc/gemini-cli/settings.json on Linux.
  • Yolo mode: Set security.disableYoloMode to true, which the page calls highly recommended in an enterprise environment.
  • Tool allowlisting: Use tool allowlists rather than the deprecated excludeTools key.
  • MCP allowlist: Set mcp.allowed, because without it the CLI allows any MCP server a user defines.
  • Local privileges: Confirm whether standard users on the managed image can change system files or the admin policy folder.

Confirm with your endpoint management team that the file permissions hold after the image is deployed and after updates.

Where admin controls leave gaps

The system settings file and admin policy folder bind ordinary users, but they stop at the edge of the machine. The gaps below sit where local rights, operating system differences, legacy config keys, MCP trust, change history and session flags decide what actually runs. For each one, the compensating controls usually sit outside the CLI, in configuration management, file integrity monitoring, MDM enforcement and log collection.

Local users can still get around policy

Google's enterprise configuration guidance says admin patterns should not be treated as a foolproof security boundary, because a user with local privileges may still circumvent them. The system file and policy folder only constrain people who cannot edit them. Check which staff hold local administrator or sudo rights on developer machines that run the agent, and remove those rights where the role does not need them. Pair the settings with MDM controls that a local user cannot easily change.

Enterprise configuration docs

Windows and macOS paths need confirmation

The documented Linux locations are /etc/gemini-cli/settings.json and /etc/gemini-cli/policies. Confirm the equivalent locations, owners and permissions on Windows and macOS before writing a rollout standard. The policy engine ignores an admin policy folder that is not root-owned or is writable by group or others, so test that check on each operating system image in your fleet. Use configuration management to set and verify those permissions on every endpoint.

Policy engine reference

Deprecated excludeTools in existing configs

The enterprise guidance recommends tool allowlisting over excludeTools, which it marks as deprecated. Older user and workspace settings may still carry exclusion lists that teams assume are enforced. Inventory settings files in repositories and home directories, migrate them to allowlists, and confirm the admin file does not depend on the deprecated key. Code review of workspace settings files that are checked into repositories is a practical control for keeping them current.

MCP servers approved by name only

Without mcp.allowed, the CLI merges and allows any MCP server a user defines. An allowlist by name, however, says nothing about what a server's tools do, what data they send, or whether the package has changed since approval. Review the tool list of each approved server, pin versions where the server supports it, and restrict who can edit workspace MCP definitions. Software composition review and a documented change process for the allowlist cover the gap the setting leaves open.

No record of who edited the system file

The supplied admin documentation does not describe a change log for the system settings file or the policy folder. Ask your vendor or deployment team to confirm whether any change record exists. Regardless of the answer, file integrity monitoring on /etc/gemini-cli, MDM enforcement, and central collection of endpoint logs give you a record of who changed the file and when. Telemetry exported through OpenTelemetry records CLI activity, not administrative edits, so do not count it as change audit.

Per-session flags can change yolo and sandbox

Google's enterprise page does not state whether a session started with a command-line option can override a system setting such as security.disableYoloMode or tools.sandbox. Test it before relying on the lock. On a pilot machine, set both values in the system file, then start a session with the relevant flag and check whether the sandbox or approval behavior changes. Where it can, restrict launch wrappers and shell aliases through endpoint policy and give staff a standard launch script.

Order of work to put admin settings in production

This sequence moves Gemini CLI admin settings from a draft file to an enforced baseline on every install. Each step ends with a check you can record, so the security reviewer can see what is enforced, what is tested and what still depends on user cooperation.

  1. Confirm client version and release channel

    The platform or tooling owner records which Gemini CLI version and release channel every workstation will run before any policy is written. Stable releases ship weekly on Tuesdays and nightly builds ship daily, so a nightly build can change behavior between checks. Pick one channel for production, pin the version you tested, and document who approves an upgrade. The step is done when the pinned version and channel appear in your rollout record and every device reports that version.

  2. Create the system overrides file with restricted ownership

    The administrator creates the System Overrides settings file at /etc/gemini-cli/settings.json on Linux. This file has the final say over user and workspace settings, so the admin sets it as root-owned with permissions that block ordinary users from writing it. Confirm the file is readable by the CLI and not writable by standard accounts. The step closes when a test user cannot edit the file and a settings change made there takes effect for that user's session.

  3. Set up and verify the admin policy folder

    Place admin policy files in /etc/gemini-cli/policies on Linux. These policies override user and default policies, but they are ignored if the folder is not root-owned or is writable by group or others. Check the folder owner and permissions after every provisioning run, because a loose umask or a configuration tool can undo them. The step is done when a deliberately restrictive test policy blocks an action that a default policy would allow, and the same test fails visibly when you deliberately loosen the folder permissions in a lab.

  4. Apply yolo, tool allowlist and MCP controls

    Set security.disableYoloMode to true, which the enterprise configuration page calls highly recommended in an enterprise environment. Define tool allowlisting instead of the deprecated excludeTools key. Set mcp.allowed, because without it the CLI merges and allows any MCP server a user defines. Record the approved server list with its owner and review date. The step closes when a test session cannot switch on yolo mode, an unlisted tool is refused and an unapproved MCP server is not loaded.

  5. Force sandboxing for tool execution

    Set tools.sandbox to docker so tool execution runs in a Docker sandbox. Confirm that Docker is installed and running on every target device, since a missing runtime is the most likely reason for a gap in coverage. Ask the endpoint team to report devices where the sandbox cannot start. The step is done when a test shell command runs inside the container and the fleet report lists no unmanaged devices.

  6. Route proxy and telemetry settings

    Configure the corporate proxy so outbound traffic from the CLI passes through your inspection and logging point. Export OpenTelemetry to the endpoint your monitoring team owns through the otlpEndpoint setting, and keep logPrompts set to false to avoid collecting sensitive prompt content. Ask the monitoring team to confirm which fields arrive and that prompt bodies do not. The step closes when a test request appears in the proxy logs and telemetry arrives without prompt text.

  7. Test circumvention and monitor for drift

    Run a scripted review with a standard user account and with a user who has local administrator rights. The enterprise configuration page says admin patterns are not a foolproof security boundary because a user with local privileges may still circumvent them, so the test should check what that user can change and how you would detect it. Schedule a recurring check of file ownership, policy folder permissions, settings values and version. Record the result and the owner of each open gap. The step is done when the test report, the drift check and the residual risk acceptance are signed by the accountable owner.

Evidence a security reviewer should request

This table lists the artifacts a reviewer should ask for to confirm that admin settings are deployed, protected and enforced on each Gemini CLI install. Each row names what to request, where the item comes from in the tool, and who owns it, so the reviewer can check the configuration rather than accept the policy text. Treat a missing artifact as an open finding until the owner produces it.

Evidence itemWhat to ask forWhere it comes from and who owns it
System overrides fileThe deployed /etc/gemini-cli/settings.json from a sample of devices, with owner, group and mode shownWritten by the platform team; the file is the final word over user and workspace settings, so the reviewer checks it on the device
Policy folder ownership and modeOutput showing /etc/gemini-cli/policies is root-owned and not writable by group or othersSet by IT endpoint management; if the folder fails this check, admin policies are ignored, so request the check result itself
Disable yolo mode settingEvidence that security.disableYoloMode is set to true in the deployed system settingsPlatform team; confirm the key appears in the system file and not only in a template
Tool allowlistThe tool allowlist in the policy files, with the change history showing who approved each entrySecurity and platform teams jointly; confirm that deprecated excludeTools is not used as the control
MCP server allowlistThe mcp.allowed list and the approved server endpoints, with the reason for each entrySecurity owns approval; without mcp.allowed, users can merge and use any MCP server they define
Sandbox setting per deviceProof that tools.sandbox is set to docker on each managed device or image, including any exceptionsEndpoint team; a device-level sample shows whether the setting holds outside the reference image
Proxy configurationThe corporate proxy settings in the system file and the egress rules that block direct outbound trafficNetwork team owns egress rules; the CLI setting alone does not prove traffic is routed
Telemetry and logPromptsThe OpenTelemetry otlpEndpoint configuration and confirmation that logPrompts is falseSecurity operations owns the collector; confirm where telemetry is sent and who can read it
Change recordsVersion-controlled history of system settings and policy files, with approvals and dated deployment recordsPlatform team and change board; confirm that Gemini CLI versions are tracked, since stable releases ship weekly

Questions buyers ask about Gemini CLI admin controls

Do these admin controls require a paid Google plan?

The supplied facts do not tie the system settings file or the admin policy folder to a specific Google plan, so confirm this before approving a rollout. The Gemini CLI repository says it is designed for Gemini Code Assist Standard and Enterprise licenses and Code Assist for GitHub on Google Cloud, and it says free individual access and Google AI Pro and Ultra moved to Antigravity CLI on June 18, 2026. Ask Google in writing which plan covers Gemini CLI for your staff, whether the Code Assist overview's quota applies to your edition, and whether any admin setting depends on a license type. Check the Gemini Code Assist Standard and Enterprise overview and confirm the answer against your own contract, since the licensing terms may change.

Can admins stop a developer from running yolo mode?

Yes, admins can set security.disableYoloMode to true in the System Overrides file, /etc/gemini-cli/settings.json on Linux. The enterprise configuration page calls this setting highly recommended in an enterprise environment. The same file has the final say over user and workspace settings, so a developer's local change does not override it, provided the file is protected with correct file permissions. Pair this with a tool allowlist, which the page recommends over the deprecated excludeTools key, so that only the tools you approve can run without a prompt. Test the setting on a managed test machine before you roll it out to all staff.

Do these controls stop a determined local administrator?

No. The enterprise configuration page says its admin patterns should not be considered a foolproof security boundary, because a user with local privileges may still circumvent them. Settings and policies are enforced for users who do not hold administrator rights on the machine. Protect /etc/gemini-cli/settings.json and /etc/gemini-cli/policies with root ownership and no group or other write access. The policy engine page says admin policies are ignored if the folder is not root-owned or is writable by group or others, so verify those permissions on every endpoint. For higher assurance, combine these controls with endpoint management that restricts local admin rights, and treat the agent as a process that a privileged user can bypass.

What effort and roles drive the cost and timeline of rolling out these controls?

The main cost drivers are the number of endpoints, the operating systems in use, how many teams need different tool allowlists, and whether you already manage endpoints centrally. Internal staff own the policy decisions, such as which tools and MCP servers are approved, while a platform or endpoint team deploys the files and verifies permissions. Costs recur when the Gemini CLI release cadence changes default behavior or when new MCP servers need review. The repository says stable releases ship weekly on Tuesdays and nightly builds ship daily, so plan a regular review of settings after upgrades. Ask any vendor for a written scope listing the endpoints, the policies, the testing approach and the review cadence before you agree on a figure.

What does a DeployOpen engagement cover, and what can our team do alone?

DeployOpen implements, hardens and documents self-hosted open-source platforms inside a client's own infrastructure, and runs security testing, including AI and agent security. Most engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts. For Gemini CLI admin controls, a DeployOpen engagement could include reviewing your settings and policy design, testing whether the files are enforced on representative machines, and documenting the configuration. DeployOpen does not publish a price list, and a quote follows from the written scope. Your team can do much of this alone if it has endpoint management skills and time for testing, and the enterprise configuration page is the primary reference to start with.

Do these controls satisfy an audit?

Not by themselves. The controls give you configuration that you can show an auditor, but only independent auditors and certification bodies issue audit reports, attestations or certifications, and DeployOpen does not either. Prepare evidence such as the deployed settings file, the file permission checks, the approved tool and MCP server lists, and test results showing that disallowed actions are blocked. The supplied facts do not say whether Gemini CLI itself is covered by any Google certification, so ask Google for its current compliance scope in writing and confirm with your assessor which controls they will accept as evidence.

Should we set mcp.allowed before we roll out the CLI?

Yes. The enterprise configuration page says that without mcp.allowed, the CLI merges and allows any MCP server a user defines. Set the allowlist in the System Overrides file so that developers cannot add their own servers to their user settings. Build the list from servers your security team has reviewed, and record who approved each one and why. Because the allowlist is only as good as the file permissions protecting it, check those permissions with the same routine you use for the tool allowlist. Revisit the list whenever you add or update an MCP server.

What this page does not cover

This page covers only what an administrator can enforce on each Gemini CLI install through the system settings file in /etc/gemini-cli/settings.json and the admin policy folder in /etc/gemini-cli/policies. It does not explain how users sign in, which Google plan license the rollout needs, or how the Antigravity CLI change affects existing subscriptions. Those questions are answered in the sibling topics on Gemini CLI licensing and quotas, sign-in and access control, and the sandbox and permissions model. Before you finalize any control here, confirm with your Google Cloud or Workspace administrator which sign-in method and plan your staff will actually use, because the enforcement points differ by authentication path.

The sibling topics on data privacy, compliance scope and self-hosting also sit outside this page. Settings such as logPrompts and the OpenTelemetry otlpEndpoint control what your own telemetry collects, but they do not tell you what Google retains, trains on or processes. Read the Gemini CLI data privacy topic for training use and retention by account type, the compliance topic for what Google's certification pages name for Gemini Code Assist, and the self-hosting topic for which components run in your environment and which remain Google-hosted models. Treat the admin settings on this page as one layer of a wider approval decision, not as a substitute for those reviews. The Gemini CLI enterprise configuration page states that these patterns are not a foolproof security boundary, so your decision should account for that limit.

How DeployOpen helps roll out Gemini CLI admin controls safely

DeployOpen approaches Gemini CLI admin controls as a written, reviewable configuration project: the system settings file, the admin policy folder, and the evidence that each control is in place on real installs. We scope the work before any file changes, build and test the settings against your environment, and hand over documentation your security team can review and maintain.

How we scope

  • We agree a written, fixed scope that names the controls to enforce, such as tool allowlists, yolo mode, sandboxing and MCP allowlisting.
  • We map which settings apply to Linux endpoints, managed workstations and developer containers in your estate.
  • We confirm with you which controls are mandatory, which are advisory, and where local privilege could still bypass them.

How we build

  • We author the system overrides settings file and admin policy folder, then protect them with root ownership and restrictive permissions.
  • We configure tool allowlisting, the disabled yolo mode setting, forced Docker sandboxing, proxy routing and telemetry options as agreed in scope.
  • We test each control on sample installs, including checks that user-level overrides cannot weaken the enforced settings.

How we hand over

  • You receive the configuration files, a control-by-control record of what is enforced and why, and the test results.
  • We document the residual gaps, including that these patterns are not a foolproof security boundary for users with local privileges.
  • We walk your engineering and security teams through the runbook so changes to the policy folder go through your review process.

How we support

  • Ongoing support, upgrades and continuous testing are available as a retainer, so settings keep pace with new Gemini CLI releases.
  • We re-test the enforced controls after upgrades, since stable releases ship weekly and nightly builds ship daily.
  • We can extend the scope to related controls such as sign-in restriction or data handling documentation when your reviewers request them.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.