Skip to main content
Gemini CLI is Google’s open-source AI coding agent for the terminal: you describe what you want in plain English, and it reads your project, edits files, and runs commands using Gemini models. To use it, install it with npm install -g @google/gemini-cli, run gemini in your project folder, and sign in with a Gemini API key. The software is free, but since June 18, 2026, Google no longer serves Gemini CLI to personal Google accounts, free or paid. To build a native iPhone app without a Mac, connect Vibecode to Gemini CLI. Gemini CLI then directs Vibecode’s agent, which builds the app on cloud Macs. Inside Vibecode itself, you can pick a Google Gemini model for any message.

Gemini CLI at a Glance

Is Gemini CLI Free?

The software is free and open source. What costs money is the Gemini model behind it, and that changed on June 18, 2026. That day Google stopped serving Gemini CLI for personal Google accounts: the free Gemini Code Assist for individuals tier, Google AI Pro, and Google AI Ultra. Sign in with Google no longer works for them. Google moved those users to a new tool, Antigravity CLI. These options still work in Gemini CLI: Limits and prices are from Google’s Gemini CLI quotas page, Gemini API pricing, and Code Assist sunset notice as of October 2026. Google’s pages disagree right now. The quota table still lists 1,000 free requests a day for a personal Google account, but the banner on the same page and Google’s deprecation notice say that sign-in stopped on June 18, 2026. This page follows the deprecation notice.

Gemini CLI Free Tier Limits

An unpaid Gemini API key gets 250 model requests a day, on Flash models only, with a per-minute limit on top. Vertex AI Express mode gives you 90 days before you must enable billing. Run /stats model in Gemini CLI to see your usage and limits. If you keep hitting the daily limit, Google recommends a paid API key or Vertex AI, which bill per token instead of stopping you.

What Is Antigravity CLI?

Antigravity CLI (command agy) is Google’s replacement for Gemini CLI on personal accounts. It has a $0 plan for individuals with basic weekly rate limits, and Google AI Pro and Ultra raise those limits. It still reads your GEMINI.md files. Google also says Gemini CLI isn’t optimized for its flagship model, Gemini 4 Argon, and points you to Antigravity for it. This guide covers Gemini CLI, which still ships every week.

How to Install Gemini CLI

Gemini CLI needs Node.js 20 or later (check with node --version). Then run one of these:
Open a new terminal window and check it worked:
It prints the version number, such as 0.65.0.
Use npm if you can. Homebrew marked its gemini-cli formula deprecated on June 18, 2026, and plans to disable it on December 18, 2026. To update an npm install, run npm install -g @google/gemini-cli@latest.

How to Sign In to Gemini CLI

For most people, that now means a Gemini API key:
  1. Create a key in Google AI Studio.
  2. Set it in your terminal:
  1. Run gemini and select Use Gemini API key.
To keep the key for every session, put GEMINI_API_KEY="YOUR_API_KEY" in ~/.gemini/.env. Gemini CLI loads that file when it starts. Other accounts:
  • Work or school account with a Code Assist license: set GOOGLE_CLOUD_PROJECT to your project ID, run gemini, and select Sign in with Google.
  • Vertex AI: set GOOGLE_CLOUD_PROJECT and GOOGLE_CLOUD_LOCATION, run gcloud auth application-default login, then select Vertex AI.
  • Personal Google account: Sign in with Google no longer works. Users report the error “This client is no longer supported for Gemini Code Assist for individuals”, or Gemini CLI asks for an API key instead.
Run /auth to change how you sign in. Google’s authentication guide has every option.

How to Use Gemini CLI

  1. Open a terminal in your project folder: cd path/to/your-project
  2. Start it: type gemini and press Enter
  3. Sign in: the first time, select Use Gemini API key
  4. Ask in plain English: for example, what does this project do? or add a dark mode toggle to the settings screen
  5. Approve changes: Gemini CLI asks before it edits a file or runs a command. Press Shift+Tab to cycle between asking every time, approving edits automatically, and Plan Mode (read-only).
  6. Keep going: describe the next change, or say commit my changes with a descriptive message
Commands you’ll use most:

Give Gemini CLI Lasting Context with GEMINI.md

GEMINI.md is a Markdown file of instructions that Gemini CLI sends with every prompt, such as “use TypeScript” or “run the tests after every change”. It reads ~/.gemini/GEMINI.md for all your projects, then any GEMINI.md in your project folder and its parent folders. Run /init to have Gemini CLI write one, /memory show to see what it loaded, and /memory reload after you edit it. To use an existing AGENTS.md too, add "context": {"fileName": ["AGENTS.md", "GEMINI.md"]} to ~/.gemini/settings.json.

How to Vibe Code an App with Gemini

“Vibe coding” means building by describing what you want and judging the result, instead of writing the code yourself (more in What is vibe coding? and Can I vibe code?). There are three common ways to do it with Gemini: Build mode in Google AI Studio is Google’s browser tool for vibe coding. You describe an app, and it writes a full-stack web app or a native Android app. Web apps deploy to Google Cloud Run. In Vibecode, every build runs Claude Code in a cloud sandbox, and the model picker in the prompt box sets the model for each message. Pick a Google Gemini model there and that message runs on Gemini, paid with Vibecode credits. You don’t need Gemini CLI or a Google API key for this.

How to Build an iPhone App with Gemini CLI

On your own, Gemini CLI can write a Swift app, but a native iPhone app needs a Mac with Xcode to build and run, plus an Apple Developer account to install or publish it. With Vibecode connected over MCP, you don’t need a Mac. Gemini CLI directs Vibecode’s agent, which writes the app, builds it on cloud Macs, tests it, and saves it to your Vibecode account.
1

Add Vibecode to Gemini CLI

Keep -s user. Without it, Gemini CLI adds Vibecode only to the folder you’re in.
2

Sign in to Vibecode

Gemini CLI doesn’t ask you to sign in on its own. Start gemini, run /mcp auth vibecode, and select Yes. Sign in to Vibecode (or create an account) and select Allow.
3

Check the connection

Run /mcp list. Vibecode shows as Ready.
The two steps people miss are -s user when you add the server, and running /mcp auth vibecode yourself. Gemini CLI doesn’t open the Vibecode sign-in page on its own.
Then ask in plain English:
  • “Using Vibecode, build me an iPhone app to track my workouts, with a weekly summary.”
  • “Build me a web app to plan my meals for the week.”
  • “Show me my Vibecode apps.”
  • “Make the buttons in my workout app blue and add a rest timer.”
  • “Why did the last build of my habit tracker fail?”
Gemini CLI asks before it runs each Vibecode tool, and you can allow a tool once or always. A build usually takes about 10 minutes. Gemini CLI can wait for it, then give you links to open the app in Vibecode, see it on your phone in the Vibecode iPhone app, or publish it to the App Store. A terminal has no app card, so you get links. Gemini CLI gets every Vibecode tool. It can read the app’s code and logs, restore an earlier version, and rename, copy, or delete apps. It also gets run_command, which runs a shell command in the app’s cloud workspace (to run tests or check a version, for example) and stops after 45 seconds. Connecting is free. To remove Vibecode, run gemini mcp remove -s user vibecode. Your apps stay in your account. Connect Vibecode to your AI tool has the steps for other apps. Want the opposite setup, where Gemini CLI writes the code and uses Vibecode to run and publish it? That’s the Vibecode CLI.

Frequently Asked Questions

The software is free and open source, but it needs model access to run. Since June 18, 2026, personal Google accounts (free, Google AI Pro, and Google AI Ultra) can’t sign in to it. The free option left is an unpaid Gemini API key from Google AI Studio. Beyond that, you pay per token.
As of October 2026, an unpaid Gemini API key gets 250 requests a day on Flash models only, plus a per-minute limit. Vertex AI Express mode runs 90 days before you need billing. Personal Google accounts, which used to get 1,000 requests a day, get none. Run /stats model to see yours.
On June 18, 2026, Google stopped serving Gemini CLI for personal accounts, including Google AI Pro and Ultra subscribers, and moved them to Antigravity CLI. Work and school accounts with a Gemini Code Assist Standard or Enterprise license can still sign in with Google. Everyone else needs a Gemini API key or Vertex AI.
Run gemini mcp add with a name and the server’s command or URL. For a remote server, add --transport http, and add -s user so it works in every folder, not just the current project. For example: gemini mcp add -s user --transport http vibecode https://api.vibecodeapp.com/mcp. If the server needs a sign-in, run /mcp auth and the server’s name inside Gemini CLI.
It can write the code, but a native Swift app needs a Mac with Xcode to build and run, and an Apple Developer account to install or publish it. With Vibecode connected, Gemini CLI has Vibecode’s agent build the app on cloud Macs, so you don’t need a Mac.
Yes. The model picker in Vibecode’s prompt box lets you choose Google Gemini models for any message, as well as Claude and OpenAI GPT models. Usage comes from your Vibecode credits, so you don’t need a Google account or API key.
No. Every Vibecode build runs Claude Code in a cloud sandbox, with the model you pick. Gemini CLI comes in only when you run it on your own computer and connect Vibecode over MCP.
Both are terminal coding agents that read your project, edit files, and run commands. Gemini CLI is open source, runs Gemini models, and has a small free tier through a Gemini API key, so it costs less to try. Claude Code runs Anthropic’s Claude models and needs a paid Claude plan (Pro is $20/month as of October 2026) or a Claude Console account. Both connect to Vibecode over MCP. See How to use Claude Code.
Both are Google coding agents for the terminal. Antigravity CLI is newer, and it’s the only one personal Google accounts can use since June 18, 2026. Gemini CLI is open source, still gets weekly releases, and works with API keys, Vertex AI, and organization licenses.

Next Steps

Connect Vibecode to Your AI Tool

Steps for Gemini CLI, Claude Code, Codex, Cursor, and more

How to Use Claude Code

Install, cost, and building apps with Claude Code

How to Use Codex

OpenAI’s coding agent, and building apps with it

How to Use Cursor

The AI code editor, and building apps with it

Build an App with ChatGPT

Build and follow an app from a ChatGPT chat

Native iOS Apps

Swift apps for iPhone, no Mac needed
Last modified on October 27, 2026