Insights & how-to

How to Use Gemini CLI: GEMINI.md, MCP, and Antigravity CLI

By the daglo team · October 20, 2026

How to Use Gemini CLI GEMINI.md to MCP

Did you follow an older Gemini CLI tutorial step by step, only to get stuck at the login screen with no idea what went wrong? The way Google offers its terminal agent changed in June 2026, so most guides written before then no longer work for personal Google accounts.

Gemini CLI is Google's open-source coding agent that lets Gemini models read code, edit files, and run commands from your terminal. This guide reflects the state of things in October 2026: which tool you should use, how to install and sign in, how to write GEMINI.md, and how to set up MCP servers and approval modes in settings.json. It also compares Gemini CLI with Claude Code and Codex CLI, and shows how daglo transcripts of planning meetings can feed your GEMINI.md.

How to use Gemini CLI in late 2026: what changed first

Hands typing on a keyboard in a dark office with code on the screen

Since June 18, 2026, free users and Google AI Pro and Ultra subscribers use Antigravity CLI instead of Gemini CLI. Gemini CLI itself still works with a paid Gemini API key or an enterprise license.

Google announced the switch on May 19, 2026, in the official repository. Antigravity CLI is a new terminal agent you launch with the agy command. It keeps Agent Skills, hooks, and subagents, and former extensions carry over as "plugins." The Gemini CLI repository stays available as Apache 2.0 open source.

Who you areTool to useHow you sign in
Free Google accountAntigravity CLIPersonal Google account
Google AI Pro or Ultra subscriberAntigravity CLIPersonal Google account
Paid Gemini API keyGemini CLIGEMINI_API_KEY environment variable
Gemini Code Assist Standard or EnterpriseGemini CLIWork Google account plus a Google Cloud project

Both tools read the same GEMINI.md instruction file, so everything below about writing instructions applies either way.

Installing and signing in: which commands to run

Install Gemini CLI with npm or Homebrew, and Antigravity CLI with Google's install script. Then run gemini or agy to sign in.

  • Gemini CLI: Run npm install -g @google/gemini-cli or brew install gemini-cli. To try it without installing, use npx @google/gemini-cli. Put a paid API key from Google AI Studio in the GEMINI_API_KEY environment variable, then run gemini.
  • Antigravity CLI: On macOS or Linux, run curl -fsSL https://antigravity.google/cli/install.sh | bash. On Windows PowerShell, run irm https://antigravity.google/cli/install.ps1 | iex. Check the install with agy --version, then run agy in your project folder and sign in with Google.

On first launch, Antigravity CLI detects your old Gemini CLI setup and shows a checklist of what to migrate. You can bring extensions over with agy plugin import gemini and check your remaining quota with /usage.

Writing GEMINI.md and how it gets loaded

Laptop screen showing rows of programming code

GEMINI.md is the Markdown instruction file Gemini CLI reads before it starts working. Put your project rules, build and test commands, and things it must never do there, and you stop repeating yourself in every chat.

Gemini CLI finds instruction files in this order, joins them, and adds them to the system prompt:

  1. Global: ~/.gemini/GEMINI.md holds habits that apply to every project.
  2. Project and parent folders: It walks up from the current folder to the project root (the folder with .git) and reads each GEMINI.md.
  3. Subfolders: It also scans folders below the working directory, skipping folders like node_modules, up to 200 folders by default.

When the file grows, split it up and pull in other Markdown files with the @docs/style.md import syntax. Run /memory show to see exactly what was loaded, and /memory refresh after you edit a file. If you also use Codex, set context.fileName to ["AGENTS.md", "GEMINI.md"] in settings.json so AGENTS.md can be your single source of truth. Antigravity CLI reads both GEMINI.md and AGENTS.md out of the box.

Connecting MCP servers and choosing an approval mode

settings.json controls Gemini CLI's models, tools, and permissions. User settings live in ~/.gemini/settings.json and project settings in .gemini/settings.json, with project settings taking priority.

MCP (Model Context Protocol) is the standard for connecting AI agents to outside services and tools. Add a server name and launch command under mcpServers in settings.json:

"mcpServers": { "github": { "command": "npx", "args": ["-y", "server-package-name"] } }

  • Server names: Use hyphens, not underscores. Underscores can break permission policy matching.
  • Remote servers: Use url or httpUrl instead of command. Antigravity CLI keeps MCP servers in a separate file (global ~/.gemini/config/mcp_config.json, project .agents/mcp_config.json) and expects remote addresses under serverUrl.
  • Tokens: Pass them through environment variables instead of writing them into the file.

Pick an approval mode with the --approval-mode flag or the general.defaultApprovalMode setting. default asks before every tool call, auto_edit approves file edits automatically, and plan is read-only. yolo, which approves everything, can only be turned on with the --yolo flag. Start with default, and set tools.sandbox to a sandbox such as docker when you need isolation.

How does it compare with Claude Code and Codex CLI?

Developer coding at a desk with several monitors

All four tools use the same setup pattern: an instruction file, a settings file, and MCP. They differ in file names and in what account you need, so the easiest choice is usually the AI subscription you already pay for.

ItemGemini CLIAntigravity CLIClaude CodeCodex CLI
Instruction fileGEMINI.mdGEMINI.md, AGENTS.mdCLAUDE.mdAGENTS.md
MCP configsettings.jsonmcp_config.jsonclaude mcp add, .mcp.jsonconfig.toml, codex mcp add
AccessPaid API key or enterprise licensePersonal Google account (Free, Pro, Ultra)Paid Claude plan or APIChatGPT account plan
StrengthOpen source, fine-grained settingsStarts on a free account, imports old setupMany examples of skills, hooks, subagentsOne ChatGPT account for CLI, IDE, and app

Free quotas and pricing change often, so double-check each tool's official docs. For Codex setup, see our Codex CLI guide, and for the bigger picture of designing instructions, tools, and permissions together, read our harness engineering guide.

Turning daglo meeting transcripts into GEMINI.md source material

A group of people sitting around a table in a meeting

A good GEMINI.md comes from the requirements your team agreed on. When you transcribe planning meetings with daglo, you get a speaker-labeled transcript and summary you can use directly as source material for instructions and task prompts.

  1. Get everyone's consent, record the planning meeting, and upload it to daglo for transcription.
  2. Collect the project's meeting notes on one board and ask Board Chat: "List only the confirmed requirements and constraints."
  3. Move rules you will keep following into GEMINI.md, and turn one-off details into the task prompt you give Gemini CLI.

If you want every meeting summarized the same way, save that request in daglo's My Templates. daglo remembers the prompt and summarizes each new recording in that format automatically.

In short: start with Antigravity CLI on a personal account, or with Gemini CLI if you have a paid API key or enterprise license. Either way, write your rules in GEMINI.md and set up MCP and approval modes once, and you will get consistent results every time.

#GeminiCLI #AntigravityCLI #GEMINImd #MCP #AICoding #HarnessEngineering #AIAgents #daglo

👉 Transcribe your next meeting free

← Back to blog

Where talk becomes work.

Get started with 1,000 credits a month — no credit card required.