Gemini CLI Alternatives: Free, Open-Source and Local Terminal Agents
November 5, 2026

Most people searching for Gemini CLI alternatives were using it for free, and that stopped on June 18, 2026. Google's announcement on the developer blog says Gemini CLI stopped serving requests that day for Google AI Pro and Ultra subscribers and for anyone using it free of charge. Those users were pointed to Antigravity CLI. Gemini CLI itself keeps running for paid API keys and for organizations on a Gemini Code Assist Standard or Enterprise licence.
So the right replacement depends on what you liked about Gemini CLI:
- It was free → Antigravity CLI (a quota with no paid plan), OpenCode's free promo models, or a local model
- It was open source → Codex CLI, OpenCode, Qwen Code, Goose, Aider or Cline
- You want to run models locally → Codex CLI with
--oss, OpenCode, Qwen Code, Goose or Aider on top of Ollama - You'll pay for the strongest agent → Claude Code or GitHub Copilot CLI
This post is the full roundup. If you're only deciding between Claude Code and Google's two CLIs, our Gemini CLI vs Claude Code comparison goes deeper on those three.
Quick comparison
| Tool | Open source | Free route | Local models | Models |
|---|---|---|---|---|
| Antigravity CLI | No | Weekly baseline quota | No | Google's models |
| Gemini CLI (paid key) | Yes, Apache-2.0 | No longer for individuals | No | Gemini |
| OpenCode | Yes, MIT | Some limited-time free models | Yes | 75+ providers |
| Codex CLI | Yes, Apache-2.0 | No (ChatGPT plan or API key) | Yes, --oss | OpenAI, plus local |
| Qwen Code | Yes, Apache-2.0 | Free OAuth tier ended April 2026 | Yes | Qwen, OpenAI, Anthropic, Gemini APIs |
| Goose | Yes, Apache-2.0 | Only with a local model | Yes | 15+ providers |
| Aider | Yes, Apache-2.0 | Only with free or local models | Yes | Almost any |
| Cline CLI | Yes, Apache-2.0 | Only with free or local models | Yes | Many providers |
| Claude Code | No | No | Not officially | Claude |
| GitHub Copilot CLI | No | Copilot plan | Yes, via your own provider | Several hosted |
What happened to Gemini CLI
Gemini CLI wasn't shut down. It changed audience. The Gemini CLI repository is still Apache-2.0 and still ships releases (v0.67.0 landed on November 4, 2026). But the top of its README now says it's meant for Code Assist Standard and Enterprise licences, that free individual access and Google AI Pro/Ultra plans "moved to Antigravity CLI on June 18, 2026," and that it isn't tuned for the Gemini 4 series or later.
That last line matters even with a paid API key: Google's newest work isn't going into Gemini CLI. Code Assist customers can stay. Everyone else needs one of the tools below.
If you want a free terminal AI coding agent
"Free" now comes in three shapes, and each one has a catch.
Antigravity CLI: Google's own replacement
Antigravity CLI, run as agy, is the terminal side of Google Antigravity. It shares an agent engine and settings with the Antigravity 2.0 desktop app, and you can export a terminal session into the app. Google's blog says Agent Skills, Hooks, Subagents and Extensions carry over from Gemini CLI, with extensions becoming Antigravity plugins.
On cost, Antigravity's plans page says users without Google AI Pro or Ultra get "a meaningful quota, refreshed weekly," with a weekly rate limit. Pro and Ultra get larger quotas that refresh every five hours, and can spend purchased AI credits on overage. The same page says there's currently no bring-your-own-key option for extra rate limits.
The catch: it isn't open source. The Antigravity CLI GitHub repo holds a README, a changelog and examples, not source code. If you picked Gemini CLI because you could read and fork it, Antigravity CLI doesn't replace that.
Pick it if you liked Gemini CLI's workflow and just want the same thing at no cost. It's the shortest move.
OpenCode with its free models
OpenCode's provider docs say it supports "75+ LLM providers" plus local models. Its own hosted service also lists several models as free, but the OpenCode models page marks each of them as free "for a limited time." Treat those as a way to try OpenCode, not a permanent plan.
A local model
The only free route with no quota is your own hardware. That's covered further down.
A note on Qwen Code. Older roundups list it as a free option because Qwen OAuth used to hand out free requests. That's out of date. Qwen Code's authentication docs state: "The Qwen OAuth free tier was discontinued on 2026-04-15." It now runs on QwenCloud or Alibaba Model Studio plans, third-party API keys, or a custom endpoint.
If you want an open-source Gemini CLI alternative
Six agents here are genuinely open source. They differ more than the licence column suggests.
| Tool | Licence | What stands out | Watch for |
|---|---|---|---|
| Codex CLI | Apache-2.0 | Closest to a big-lab agent, from OpenAI | Needs a ChatGPT plan or API key |
| OpenCode | MIT | Widest model choice; terminal, desktop and IDE | Claude subscriptions aren't supported |
| Qwen Code | Apache-2.0 | Started as a Gemini CLI fork | Diverged from upstream at v0.1 |
| Goose | Apache-2.0 | General agent, not just code | Broader than a pure coding tool |
| Aider | Apache-2.0 | Git-native, commits every change | Slow release pace |
| Cline CLI | Apache-2.0 | Same agent core as the Cline IDE extensions | Bring your own keys |
Codex CLI
Codex CLI is OpenAI's terminal agent, licensed Apache-2.0. Its README recommends signing in with ChatGPT to use it as part of a Plus, Pro, Business, Edu or Enterprise plan, with an API key as the alternative. If you already pay OpenAI, it's the obvious first try.
Qwen Code
Qwen Code is the most familiar move for Gemini CLI users, for a simple reason. Its README says the project "was originally based on Google Gemini CLI v0.8.2," then stopped syncing with upstream at v0.1 and became its own multi-protocol agent. It supports OpenAI, Anthropic, Gemini and Qwen APIs, any third-party provider, and local models through Ollama or vLLM. It also has subagents, agent teams, MCP, IDE plugins and a desktop app.
Goose
Goose has moved since most roundups were written. It now lives at aaif-goose/goose and is part of the Agentic AI Foundation at the Linux Foundation. It's a general-purpose agent with a desktop app, a CLI and an API, built in Rust, working with 15+ providers and 70+ MCP extensions. Its ACP provider guide also lets it drive other agents with subscriptions you already have, including Claude Code and Codex.
Aider
Aider is the veteran. It maps your repo and commits each change with a sensible message, so undoing anything is plain git. Check the pace before you standardise on it, though: the latest release on PyPI is 0.86.2, from February 12, 2026, and its model recommendations still name older models like Gemini 2.5 Pro and Claude 3.7 Sonnet.
OpenCode and Cline CLI
OpenCode's draw is breadth: any of 75+ providers, sign-in with ChatGPT Plus or Pro, GitHub Copilot or GitLab Duo, and a desktop app. One catch for Claude fans: its docs say Anthropic prohibits using Claude Pro or Max subscriptions through third-party plugins, and OpenCode stopped bundling them in version 1.3.0. Claude models still work with an API key.
Cline describes itself as an "autonomous coding agent as an SDK, IDE extension, or CLI assistant." Its CLI shares a core with the VS Code and JetBrains versions, so a team split between terminal and editor can share one setup.
If you want to run models locally
Local models fix two things at once: nothing leaves your machine, and each run is free. The trade is quality. Small open-weight models are weaker than frontier models on long, multi-step agent runs, so keep tasks scoped.
| Tool | How it runs local models |
|---|---|
| Codex CLI | --oss flag, with --local-provider set to Ollama or LM Studio |
| OpenCode | Ollama, LM Studio, llama.cpp and other OpenAI-compatible servers |
| Qwen Code | Ollama or vLLM through a custom provider |
| Goose | Ollama, among its 15+ providers |
| Aider | Ollama or any OpenAI-compatible API |
| Copilot CLI | Your own provider, including Ollama |
Most setups start with Ollama serving a model on your machine, then point the agent at its local endpoint. GitHub's Copilot CLI docs name the constraint that applies to every tool here: the model must support tool calling and streaming. Many small models fail that bar, so test a real task before you commit. If you're choosing the runtime itself, LM Studio vs Ollama covers the trade-offs.
If you'll pay for the strongest agent
Claude Code
Claude Code is Anthropic's terminal agent, and the one most Gemini CLI users compare against first. Its setup docs say it needs a paid Claude plan or a Console account, and "the free claude.ai plan does not include Claude Code access." You also get it through Amazon Bedrock, Google Cloud's Agent Platform or Microsoft Foundry. It isn't open source, and it runs Claude models only.
What you pay for is depth: skills, plugins, hooks, subagents and MCP, documented together, plus the same agent in IDEs, a desktop app and the web. If you'd also consider leaving Claude for something else, our Claude Code alternatives guide works through that in reverse, and Claude AI alternatives covers the chat side.
GitHub Copilot CLI
If your company already pays for Copilot, Copilot CLI is the low-friction pick. GitHub says usage consumes AI credits based on tokens processed, varying by model. You can also point it at your own model provider, including local ones. It isn't open source.
Which Gemini CLI alternative should you pick?
- Want the same experience, free, from Google? → Antigravity CLI.
- Want open source that feels like Gemini CLI? → Qwen Code.
- Already pay for ChatGPT? → Codex CLI.
- Want the most model choice? → OpenCode.
- Need everything local? → OpenCode, Qwen Code or Codex CLI on Ollama, with small tasks.
- Will pay for the deepest agent? → Claude Code.
- On a Code Assist licence at work? → Stay on Gemini CLI.
Key points to take away:
- Gemini CLI still exists, but only for paid API keys and Code Assist organizations, and Google says it isn't tuned for Gemini 4 and later
- Antigravity CLI is the free Google route, with a weekly quota, and it isn't open source
- Qwen Code's free OAuth tier ended on April 15, 2026, so older "best free" lists are wrong about it
- Open source plus a local model is the only route with no quota and no bill, at the cost of output quality
When the terminal is the real obstacle
Every tool above assumes you're fine in a terminal with API keys and a repo that builds. Some people searching for a free Gemini CLI alternative really wanted something simpler: run a useful AI workflow without wiring any of that up. Taku is an AI-native desktop workspace for that. You mirror an AI app, skill or workflow someone already got working, run it, remix it and keep it. It isn't a coding agent. Taku is in Beta, and the Mac app is available now.
FAQ
What is the best Gemini CLI alternative?
For most individuals, Antigravity CLI, because it's Google's official replacement and carries over skills, hooks, subagents and extensions. For open source, Qwen Code is the closest match since it began as a Gemini CLI fork. If you'll pay for a stronger agent, Claude Code.
Is there a free Gemini CLI alternative?
Yes, with limits. Antigravity CLI gives accounts without Google AI Pro or Ultra a weekly-refreshed quota. OpenCode offers some models free for a limited time. And any open-source agent here is free to run with a local model through Ollama.
What is the best open-source Gemini CLI alternative?
Qwen Code if you want something that feels like Gemini CLI, Codex CLI if you use OpenAI models, and OpenCode if you want the widest model choice. All three are open source (Apache-2.0 or MIT), and all can run local models.
Is Gemini CLI still free?
Not for individuals. Since June 18, 2026, it no longer serves free users or Google AI Pro and Ultra subscribers. It keeps working with paid Gemini API keys and for organizations on Gemini Code Assist Standard or Enterprise.
Is Qwen Code still free?
Not through Qwen OAuth. Qwen Code's docs say that free tier was discontinued on April 15, 2026. The agent itself is free and open source, so you can run it on a local model or pay a provider for API access.
Can I run a terminal coding agent completely offline?
Mostly, yes. Codex CLI, OpenCode, Qwen Code, Goose and Aider can all use a local model served by Ollama, so prompts and code stay on your machine. Expect weaker results than hosted frontier models on long tasks.