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

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

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 are | Tool to use | How you sign in |
|---|---|---|
| Free Google account | Antigravity CLI | Personal Google account |
| Google AI Pro or Ultra subscriber | Antigravity CLI | Personal Google account |
| Paid Gemini API key | Gemini CLI | GEMINI_API_KEY environment variable |
| Gemini Code Assist Standard or Enterprise | Gemini CLI | Work 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-cliorbrew install gemini-cli. To try it without installing, usenpx @google/gemini-cli. Put a paid API key from Google AI Studio in theGEMINI_API_KEYenvironment variable, then rungemini. - Antigravity CLI: On macOS or Linux, run
curl -fsSL https://antigravity.google/cli/install.sh | bash. On Windows PowerShell, runirm https://antigravity.google/cli/install.ps1 | iex. Check the install withagy --version, then runagyin 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

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:
- Global: ~/.gemini/GEMINI.md holds habits that apply to every project.
- Project and parent folders: It walks up from the current folder to the project root (the folder with .git) and reads each GEMINI.md.
- 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
urlorhttpUrlinstead 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 underserverUrl. - 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?

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.
| Item | Gemini CLI | Antigravity CLI | Claude Code | Codex CLI |
|---|---|---|---|---|
| Instruction file | GEMINI.md | GEMINI.md, AGENTS.md | CLAUDE.md | AGENTS.md |
| MCP config | settings.json | mcp_config.json | claude mcp add, .mcp.json | config.toml, codex mcp add |
| Access | Paid API key or enterprise license | Personal Google account (Free, Pro, Ultra) | Paid Claude plan or API | ChatGPT account plan |
| Strength | Open source, fine-grained settings | Starts on a free account, imports old setup | Many examples of skills, hooks, subagents | One 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 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.
- Get everyone's consent, record the planning meeting, and upload it to daglo for transcription.
- Collect the project's meeting notes on one board and ask Board Chat: "List only the confirmed requirements and constraints."
- 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
Where talk becomes work.
Get started with 1,000 credits a month — no credit card required.