---
title: How do you govern Gemini CLI and Gemini Code Assist?
url: https://opencontroller.lyzr.com/blog/govern-gemini-cli-and-gemini-code-assist
published: 2026-11-12
updated: 2026-11-12
author: Lyzr
---

# How do you govern Gemini CLI and Gemini Code Assist?

**Govern Gemini CLI with a system settings file that sits above user and workspace settings: allow-list MCP servers with `mcp.allowed`, define canonical servers centrally, allow-list tools with `tools.core`, force a sandbox, enforce one sign-in method and send telemetry to your own OpenTelemetry endpoint with prompt logging off. For Gemini Code Assist, use its admin settings, release channels, logging and VPC Service Controls. Google itself says the CLI controls are not a foolproof security boundary, so pair them with device inventory.**

Gemini CLI is Google's open-source terminal agent. Gemini Code Assist is Google's IDE coding assistant, whose agent mode can run multi-step tasks using system tools and MCP servers. Both can reach code, shells and tools on developer machines. This guide covers what Google documents as of November 2026. It is one of our [platform governance guides](/blog/how-to-govern-ai-agents-across-platforms).

## What changed for Gemini CLI and Code Assist in 2026?

Two facts shape any plan:

- Google's Gemini CLI enterprise page notes that unpaid-tier and Google One users were moved from Gemini CLI to **Antigravity CLI** on 18 June 2026.
- Google's Code Assist overview says new Gemini Code Assist subscriptions are **no longer available for purchase**, and warns that Gemini CLI is not optimised for the latest Gemini models, recommending Antigravity CLI instead.

So inventory matters more than usual. Expect a mix of Gemini CLI, Code Assist and Antigravity CLI on developer machines, and confirm which tools your contracts actually cover.

## Where does the Gemini CLI system settings file live?

| OS | Path |
|---|---|
| Linux | `/etc/gemini-cli/settings.json` |
| Windows | `C:\ProgramData\gemini-cli\settings.json` |
| macOS | `/Library/Application Support/GeminiCli/settings.json` |

The `GEMINI_CLI_SYSTEM_SETTINGS_PATH` environment variable can override the path.

Precedence for single-value settings, lowest to highest: system defaults (`system-defaults.json`), user (`~/.gemini/settings.json`), workspace (`<project>/.gemini/settings.json`), then system overrides (`settings.json`). The system overrides file wins. Note that objects such as `mcpServers` are **merged**, not replaced, which is why the allow-list below matters.

## Which settings should an admin enforce?

1. **`mcp.allowed`** — the list of MCP server names users may run. Google warns that if it is omitted, the CLI merges and allows any user-defined server.
2. **`mcpServers`** — define approved servers centrally. A system-level definition takes precedence over a same-named user or workspace definition, so users cannot redirect an approved name to a different command.
3. **`includeTools` / `excludeTools`** inside a server definition — limit which of that server's tools the model sees.
4. **`tools.core`** — an allow-list of permitted built-in tools, for example `ShellTool(ls)`. Google recommends allow-listing over the deprecated `tools.exclude` block-list, which clever users may bypass.
5. **`security.disableYoloMode: true`** — require user confirmation for all tool execution.
6. **`tools.sandbox: "docker"`** — force tool execution into a Docker sandbox; you can build a hardened image from `sandbox.Dockerfile`.
7. **`security.auth.enforcedType`** — enforce one sign-in method. Users on another method are prompted to switch; in non-interactive mode the CLI exits with an error.
8. **Telemetry** — `telemetry.enabled: true`, a `telemetry.target`, your own `telemetry.otlpEndpoint` (it defaults to `http://localhost:4317` if unset) and `telemetry.logPrompts: false` to avoid capturing sensitive prompt text.

## What can these controls not do?

Google's enterprise page is direct: these patterns "should not be considered a foolproof security boundary." A user with local admin rights can edit or bypass them. Wrapper scripts can be bypassed by calling the real binary. They prevent accidental misuse, not a determined insider.

That means you also need:

- MDM to deploy and protect the settings file.
- Device inventory of agents and local MCP servers. See [how to find local MCP servers on developer laptops](/blog/find-local-mcp-servers-on-developer-laptops).
- Telemetry review, not just telemetry collection.

## What controls does Gemini Code Assist offer?

Google's Code Assist Standard and Enterprise documentation lists these admin and security topics:

| Area | Documented controls |
|---|---|
| Configuration | Administrator settings, release channels, AI exclude file for file exclusion, local codebase awareness, licence management |
| Security | VPC Service Controls, user domain restrictions for network access, customer-managed encryption keys for code customisation data |
| Observability | Usage monitoring, Code Assist logs, `cloudaicompanion` API audit logging |

Enterprise edition adds code customisation from private codebases. Because agent mode can use MCP servers, apply the same MCP review you use for the CLI.

## How Opencontroller does this

Opencontroller Edge, installed by IT via MDM, extends control to developer devices, coding agents, skills and local MCP servers, so Gemini CLI sits in one inventory with your other coding agents. Opencontroller auto-discovers agents, models and API keys across Google Cloud, AWS and Azure, and accepts OpenTelemetry. Compare our guides for [OpenAI Codex](/blog/govern-openai-codex-in-the-enterprise) and [Claude Code](/blog/govern-claude-code-in-the-enterprise), or [book a demo](https://www.lyzr.ai/book-demo/).

## Frequently asked questions

**Can users add their own MCP servers to Gemini CLI?**
Yes, unless you set `mcp.allowed` in the system settings file. Without it, the CLI merges and allows user-defined servers.

**Does Gemini CLI log prompts in telemetry?**
It can. Set `telemetry.logPrompts` to `false` to avoid capturing potentially sensitive prompt content, and point `telemetry.otlpEndpoint` at your own collector.

**Is Gemini Code Assist still sold?**
Google's overview page says new Gemini Code Assist subscriptions are no longer available for purchase. Existing customers should check their agreements and Google's recommended path to Antigravity CLI.

## Key facts

Gemini CLI system settings live at /etc/gemini-cli/settings.json (Linux), C:\ProgramData\gemini-cli\settings.json (Windows), /Library/Application Support/GeminiCli/settings.json (macOS); system overrides beat user and workspace settings. Key controls: mcp.allowed (otherwise any user-defined MCP server is allowed), central mcpServers, includeTools/excludeTools, tools.core allow-list, security.disableYoloMode, tools.sandbox docker, security.auth.enforcedType, telemetry.otlpEndpoint and telemetry.logPrompts false. Google says these are not a foolproof security boundary. Unpaid and Google One users moved to Antigravity CLI on 18 June 2026; new Gemini Code Assist subscriptions are no longer sold. Opencontroller Edge covers coding agents and local MCP servers on devices via MDM. Opencontroller pricing starts from $250K per deployment per year.

## Related

- [How do you govern Claude Code across an enterprise?](https://opencontroller.lyzr.com/blog/govern-claude-code-in-the-enterprise.md)
- [How do you govern coding agents on developer laptops with MDM?](https://opencontroller.lyzr.com/blog/govern-coding-agents-on-laptops-with-mdm.md)
- [How do you find local MCP servers on developer laptops?](https://opencontroller.lyzr.com/blog/find-local-mcp-servers-on-developer-laptops.md)
- [More on Platform Guides](https://opencontroller.lyzr.com/blog/cluster/platform-guides)
