Building on the basics of an AI Harness: Gemini CLI is Google’s open-source coding agent for the terminal, turning Gemini models into a working AI agent with tools for the file system, shell and web plus MCP extensibility — licensed under Apache-2.0, made by Google. As of 20 September 2026.
What is Gemini CLI?
Gemini CLI is developed and published by Google as an open-source project on GitHub (google-gemini/gemini-cli) under the Apache-2.0 licence, with weekly preview, stable and nightly releases. It is installed with npm install -g @google/gemini-cli, run instantly via npx @google/gemini-cli, or installed with Homebrew (brew install gemini-cli); the interactive session starts with the gemini command in a project directory. Its primary surface is the terminal, complemented by a VS Code companion extension for IDE integration.
Gemini CLI as an AI harness
Gemini CLI’s agent loop calls the model, evaluates its tool requests and executes them in a controlled environment — unsandboxed or in one of five sandbox variants (macOS Seatbelt, Docker/Podman containers, native Windows sandbox, gVisor/runsc, or experimental LXC/LXD on Linux). Tools are extended via the Model Context Protocol (MCP), addressed in chat with @servername. Project context comes from GEMINI.md files at global, workspace and just-in-time level, automatically merged by the CLI and managed via /memory show and /memory reload. Checkpointing saves the state in a shadow Git repository under ~/.gemini/history/<project_hash> before every file change; /restore reverts changes together with the conversation history. For split work, subagents are available, including the built-in “Codebase Investigator”, plus remote subagents via the Agent-to-Agent protocol (A2A). Extensions bundle prompts, MCP servers, custom commands, hooks, subagents and agent skills into installable GitHub packages (gemini extensions install <repo-url>).
Models and model access
Gemini CLI is tied exclusively to Gemini models from the Gemini 3 family. Access works via three routes: Google sign-in (OAuth) with a limited free allowance, a Gemini API key via the GEMINI_API_KEY environment variable, or Vertex AI with GOOGLE_CLOUD_PROJECT and GOOGLE_CLOUD_LOCATION for Application Default Credentials, a service account key, or a Google Cloud API key. For the latter two authentication routes, the configuration reference documents a redirectable base URL — GOOGLE_GEMINI_BASE_URL for API-key sign-in, GOOGLE_VERTEX_BASE_URL for Vertex AI sign-in, both restricted to HTTPS (or localhost). This makes operation through a central proxy such as the AI Gateway possible, provided that proxy offers the API format Gemini CLI expects — the Gemini API or Vertex AI protocol.
Enterprise use: data protection and governance
OpenTelemetry-based telemetry (GEMINI_TELEMETRY_ENABLED) is disabled by default and must be actively switched on before logs, metrics and traces can be sent to Google Cloud, local files, or a custom OTLP endpoint. Separate from this is the anonymous usage-statistics setting (privacy.usageStatisticsEnabled), which, per the configuration reference, is enabled by default and can be turned off in settings.json. For enterprise settings, the documentation explicitly recommends setting telemetry.logPrompts to false so prompt content is not logged. Administrators can enforce Google sign-in via security.auth.enforcedType, restrict access to their own Workspace domain via X-GoogApps-Allowed-Domains, restrict tools via an allowlist (tools.core), and mandate sandboxing centrally. The Gemini CLI documentation does not state a specific EU data residency or GDPR commitment; Vertex AI users set the region themselves via GOOGLE_CLOUD_LOCATION. Regardless of the auth route: source code and prompts go to the chosen model provider (Google) and belong in the record of processing activities beforehand. Since 18 June 2026, per Google’s official announcement of 19 May 2026 (published as part of Google I/O 2026) and a banner in the Gemini CLI documentation, free access for Google AI Pro and Ultra, Gemini Code Assist for individuals, and Google One users has been discontinued (Google points to Antigravity CLI as the replacement); Code Assist licences and paid API access are unaffected.
Orchestrating Gemini CLI with herdr
The terminal multiplexer herdr detects Gemini CLI, but as of 20 September 2026 its own agent overview classifies the integration, together with Cline, as “detected but less thoroughly tested” — unlike agents with a documented screen manifest or lifecycle hooks, the state of this integration is not yet fully specified.
Where it fits: developer harness and enterprise harness
Like other coding harnesses, Gemini CLI targets developers working in the terminal. For business users without a terminal workflow, CompanyGPT is the matching harness — with tools via MCP servers, integrations and n8n instead of shell commands. The AI Gateway provides the shared cost and governance layer across all model access in an organisation. An overview of further harnesses is available on the AI harness overview page. We help organisations fit Gemini CLI and other coding harnesses cleanly into an existing AI governance concept.
