Back to guides
Coding agents·September 21, 2026·8 min read

Gemini CLI alternatives: choose by workflow and API control

The repository is alive and the free login is gone, so "alternatives" means either new access or a new client — and a protocol wall, not a preference, decides which one you need.

Last reviewed on .

Gemini CLI is not retired, but its free door is — so "alternatives" splits into two different decisions. The repository is alive: google-gemini/gemini-cli is not archived, carries Apache-2.0 and was last pushed September 21, 2026, and npm stable @google/gemini-cli is 0.60.0, published September 15, 2026, with nightlies still building daily and no deprecation flag (GitHub and npm APIs, checked September 21, 2026). What ended is access. If you are leaving because the login stopped working, you need new access. If you are leaving because you want your own endpoint behind the agent, you need a new client — and that second one is settled by a protocol wall, not by preference.

One disambiguation before any number. A cryptocurrency exchange also called Gemini publishes its own "Gemini API" docs and its own fee schedule, MacPaw sells a macOS duplicate-file finder named Gemini 2, and the gemini:// protocol has its own terminal browsers. None of their prices belong on this page. Google's own names split six ways too — Gemini CLI, Antigravity CLI, Gemini Code Assist, the Gemini app subscriptions, the Gemini API, and the Gemini Enterprise Agent Platform — so every figure below says which one it came from.

Why people are leaving Gemini CLI right now

Google announced on May 19, 2026 that it was transitioning Gemini CLI to Antigravity CLI, stating that "On June 18, 2026, Gemini CLI and Gemini Code Assist IDE extensions will stop serving requests for Google AI Pro and Ultra, as well as those using it free of charge". Google's consumer deprecation page, last updated September 2, 2026, adds that "you can no longer use the Login with Google option to access the IDE extensions or Gemini CLI", that Standard and Enterprise subscriptions "remain unchanged", and that affected users can migrate to the Antigravity family.

Piece of Gemini CLIStatus on September 21, 2026
The repositoryNot archived, Apache-2.0, default branch main, pushed that day
The npm packageStable 0.60.0 (September 15, 2026); preview 0.61.0-preview.0; nightlies daily; no deprecation flag
Login with Google, and free Code Assist for individualsStopped serving Gemini CLI on June 18, 2026
Google AI Pro and Google AI Ultra subscriptionsStopped serving Gemini CLI on the same date
Code Assist Standard or Enterprise licenceUnchanged; still reaches Gemini CLI
Paid Gemini or Gemini Enterprise Agent Platform API keyStill reaches Gemini CLI
Google's named successorAntigravity CLI, command agy

Expect one stale source to contradict all of this. The README on main still advertises "60 requests/min and 1,000 requests/day with personal Google account", repeats the free tier twice more, and mentions neither Antigravity nor June 18 anywhere (fetched September 21, 2026). Google's dated deprecation pages are the later word; the README is the trap.

The second trap is a subscription price anchor. Google AI lists a free tier at $0, Plus at $4.99 per month and Pro at $19.99 per month, and Google's May 19, 2026 announcement gives Ultra at $100 and $200 per month — but these are Gemini app subscriptions, and Pro is precisely the tier the transition post names as having stopped being served, alongside Ultra and free Code Assist for individuals. No tier on that subscriptions page is documented as buying Gemini CLI quota. Whether the Ultra figures still stand was not verified on a current pricing page; the subscriptions page does not list Ultra at all.

Staying: what Gemini CLI costs once the free door is shut

Two metered paths remain. The licence path is a per-seat purchase, and Gemini Code Assist quotas (footer dated September 18, 2026) cap it by request count, noting that the daily limits are "aggregated across all interactions with any model version or family (for example, Pro, Flash) used with the Gemini CLI or agent mode" — so one prompt can spend several requests and switching to a cheaper model buys no headroom.

Gemini Code Assist licenceMonthly commitment12-month commitmentRequests per user per day
Standard$22.80 per licence$19.00 per licence1,500
Enterprise$54.00 per licence$45.00 per licence2,000

Prices read from Google's Gemini pricing page on September 21, 2026; the page also shows hourly equivalents and notes that subscriptions bill monthly. The key path is per-token instead. Gemini API pricing, last updated September 16, 2026, lists these two among others — and the Flash figures are a dated introductory price that steps up, which is the sort of number that goes stale in a blog post.

Gemini API modelInput per 1M tokensOutput per 1M tokens
gemini-3.8-flash$0.75 through December 31, 2026, then $1.50 from January 1, 2027$3.75 through December 31, 2026, then $7.50
gemini-3.1-pro-preview$2.00 for prompts up to 200k tokens; $4.00 above$12.00 up to 200k tokens; $18.00 above

That same page lists a Batch API at a 50% cost reduction, and prints batch columns for these models at half the standard rates. Note the context tiering on Pro: an agentic loop re-sends its context on every step, so quoting only the sub-200k figure understates it. Caching, grounding and tool-use line items were not extracted here, so treat these as base token rates rather than a total. Gemini CLI quota covers the request-counting side in more detail.

The wall that decides your shortlist

Gemini CLI does support a custom endpoint. Its in-repo configuration reference documents GOOGLE_GEMINI_BASE_URL as overriding "the default base URL for Gemini API requests (when using gemini-api-key authentication)", requiring HTTPS unless the target is localhost, with a separate GOOGLE_VERTEX_BASE_URL for the path Google has since renamed the Gemini Enterprise Agent Platform. Google's rendered docs site lists no base-URL override at all, so the variable is documented in the repository but not on the published site — real, just easy to miss.

The catch is the wire format. In the released source on main that URL is passed to the @google/genai SDK as httpOptions.baseUrl with vertexai false, so every request leaves as Google's native Gemini protocol, and the auth enum offers no OpenAI-compatible and no Anthropic option. The key travels in an x-goog-api-key header by default; the same file reads GEMINI_API_KEY_AUTH_MECHANISM, and setting it to bearer moves the key to an Authorization header on the gemini-api-key and vertex-ai paths — which changes the header and not the wire format, so it is no escape either. That source also holds an undocumented GATEWAY auth type, selected from the environment whenever GOOGLE_GEMINI_BASE_URL is set — ahead of GEMINI_API_KEY, behind only the explicit Google-login and Vertex switches — and whose key falls back to an empty string. The word "gateway" appears nowhere in the configuration docs, it was read as code rather than as an API contract, and it still speaks the native protocol, so it rescues nothing.

Kunavo serves /v1/chat/completions, /v1/messages and /v1/responses. Re-probed September 21, 2026: api.kunavo.com/v1/models answers 401, while /v1beta/models and /v1beta/models/<model>:generateContent both answer 404. Kunavo is not a valid target for GOOGLE_GEMINI_BASE_URL, and pretending otherwise would cost you an afternoon. Change the client, not the endpoint.

Kunavo serves no embedding, text-to-speech or speech-to-text model either, so a workflow that needs any of those keeps its existing provider for that step.

Antigravity CLI inherits the same wall. Its install and auth documentation says you can run it "with your own Gemini API key instead of a signed-in Google account" and set GOOGLE_GEMINI_BASE_URL to reach "a different Gemini-compatible endpoint" — Gemini-compatible, not OpenAI-compatible. Separately, its plans page states there is currently no support for "Bring-your-own-key or bring-your-own-endpoint for additional rate limits". Those are compatible statements and the qualifier is load-bearing: you may run on your own key, but doing so buys no subscription quota. Its Individual tier is listed at $0 per month (checked September 21, 2026), and no numeric rate limit is printed for any tier. Read that tier's inclusions narrowly: the list under it names model access, unlimited tab completions, unlimited command requests and "Basic weekly rate limits", and does not name the CLI — the only plan that page names the CLI under is the organization plan via Google Cloud. Whether the free tier reaches agy is not something that page answers either way.

Which alternative fits which reason for leaving

Why you are leavingThe fitStatus checked September 21, 2026What you give up
You want Google's own path and its models, with the least disruptionAntigravity CLI (agy)Repo not archived, pushed September 19, 2026; no source files and a null licence field in that repository; installs as a prebuilt binaryApache-2.0 npm distribution, and any published licence in that repo; quota numbers Google does not print
You want the same-shaped terminal agent on your own OpenAI-compatible endpointQwen CodeApache-2.0, not archived; npm @qwen-code/qwen-code 0.24.3 published that dayIts own hosted free tier — Qwen OAuth ended April 15, 2026; and byte-compatibility, since it stopped syncing with upstream at v0.1
You want a permissively licensed agent from a different lineageOpenCodeMIT, not archived, pushed that day; sst/opencode now resolves to anomalyco/opencodeThe Gemini CLI muscle memory; config and flags are its own
You want a polished terminal UI and do not mind a licence reviewCrushNot archived, pushed that day; GitHub reports the licence as "Other" / NOASSERTION rather than an SPDX idA machine-readable licence answer — read the LICENSE file before a policy review
You work inside an editor rather than a terminalClineApache-2.0, not archived, pushed that dayThe headless terminal workflow and the --acp editor wiring
You want a small diff-first CLI with a git-native loopAiderApache-2.0, not archived — but the last commit on its default branch is May 22, 2026, four months quietCurrent release cadence. No maintainer statement was checked, so read that as a date, not a diagnosis

Status read from the GitHub REST API and the npm registry on September 21, 2026. One caution on OpenCode: a separate opencode-ai/opencode repository has been archived since September 2025 and continued as Crush, so configuration or prices found there describe Crush's lineage rather than OpenCode's. Compare the two in Crush vs OpenCode, and see Qwen Code pricing for what its routes cost.

What migrates, and what you leave behind

Qwen Code is the shortest hop, so it is the one worth costing precisely. Both sides were read from their own documentation on September 21, 2026: Gemini CLI's configuration reference and extension reference, and Qwen Code's settings and authentication pages. The lineage claim below comes from Qwen Code's own README, which states the project was originally based on Gemini CLI v0.8.2 and stopped syncing with upstream at Qwen Code v0.1.

What you have in Gemini CLIWhere it lands in Qwen Code
GEMINI.md context filesLoads, if you name it. Qwen Code defaults to QWEN.md and documents context.fileName as a string or array of strings — the same setting key Gemini CLI uses
mcpServers block in settingsSame key name, different directory: ~/.qwen/settings.json or .qwen/settings.json, with command, args, env and a timeout
~/.gemini/settings.json as a wholePort it, do not copy it. The projects diverged at Qwen Code v0.1 and the schemas are not guaranteed to match key for key
Shell historyStays behind. It lives at ~/.gemini/tmp/<project_hash>/shell_history, keyed by a hash of the project path
ExtensionsStay behind. Gemini CLI installs an extension as its own copy from a GitHub repository URL or a local path and re-pulls it with gemini extensions update, in its own manifest format; Qwen Code documents a separate extension system of its own
--acp editor integrationNot transferable as configuration. ACP is a transport between agent and editor, unrelated to which endpoint the agent calls

The Antigravity route has its own migration story and a narrower one than it first reads: its CLI overview says onboarding "supports a one-time import to automatically migrate your existing Gemini CLI extensions, skills, and settings". It names those three things and is silent on chat history, checkpoints and shell history — which is neither a promise nor a denial about them.

For the Qwen Code route, the whole change is one merged settings block. Set the key in your environment, name the base URL at the API's /v1 root rather than the full chat-completions path, and keep GEMINI.md in the context list so your existing project instructions still load:

Merge into ~/.qwen/settings.json
{
  "context": { "fileName": ["QWEN.md", "GEMINI.md"] },
  "modelProviders": {
    "openai": [
      {
        "id": "claude-sonnet-4-6",
        "name": "Claude Sonnet 4.6 (Kunavo)",
        "baseUrl": "https://api.kunavo.com/v1",
        "envKey": "KUNAVO_API_KEY"
      }
    ]
  },
  "env": { "KUNAVO_API_KEY": "sk-kn-..." },
  "security": { "auth": { "selectedType": "openai" } },
  "model": { "name": "claude-sonnet-4-6" }
}

Rollback is cheap, and worth arranging before you start. None of this touches your Gemini CLI install: ~/.gemini/ is untouched by a Qwen Code setup, and if you still hold a Code Assist Standard or Enterprise licence or a paid Gemini key, gemini keeps working exactly as before. Keep that route funded until one real task has run end to end on the new client. Copy ~/.gemini/settings.json somewhere safe first anyway — it is the file most likely to be edited by hand twice.

A worked estimate for the new client

This is illustrative token arithmetic, not a measured task cost and not a bill ceiling. Assume one agentic session of 10 steps, each sending 60,000 uncached input tokens — the loop re-sends its context every step — and receiving 1,500 output tokens: 600,000 input and 15,000 output in total. No caching, no tool-call overhead and no retries are modelled, and real sessions vary by more than the gaps below. Rates are live Kunavo catalog prices per million tokens.

ModelInput / output per 1MEstimate for the assumed session
Gemini 3.8 Flash$0.525 / $2.625$0.354
Claude Haiku 4.5$0.40 / $2.00$0.270
GPT-5.6 Terra$0.70 / $4.20$0.483
Claude Sonnet 4.6$1.20 / $6.00$0.810

Leaving the client does not mean leaving the model family: Kunavo's catalog carries Gemini models alongside Claude and GPT ones, so a Qwen Code or OpenCode setup can still call Gemini 3.8 Flash. Check the live catalog for what is listed on the day you read this. Kunavo's catalog amount is a billing floor rather than a cap — when the upstream reports its charge, the bill is the greater of catalog cost and upstream cost times the applicable markup. The minimum top-up is $10 in prepaid credit, a funding minimum rather than a task fee or a subscription; see billing details.

Note which question that table answers. The cheapest listed rate and the lowest cost to finish your task are different claims: a model that needs three attempts at a low rate can cost more than one that lands it once. Shortlist on rate, then measure one bounded task on your own repository and read what your account actually recorded for it.

Set it up and check the first task

Kunavo publishes a setup reference for the closest hop. That is a published configuration page, not a compatibility test — Qwen Code has not been runtime-tested here against Kunavo's endpoint, and neither has any other client on this page. Start at the Qwen Code integration guide, or the OpenCode, Crush, Cline and Aider pages if one of those fits your reason for leaving better. Create a Kunavo account when you are ready to fund a key.

Still deciding whether to switch clients at all? Gemini CLI vs Claude Code compares the workflows directly, and the OpenCode provider comparison covers the same routing question from the other end.

FAQ

Is Gemini CLI discontinued?

The repository is not discontinued; the free consumer door into it is. google-gemini/gemini-cli is not archived and not disabled, carries Apache-2.0, and was last pushed September 21, 2026 (GitHub API, checked that day). On npm, @google/gemini-cli stable is 0.60.0 published September 15, 2026, with a 0.61.0-preview.0 preview tag and nightlies still building daily, and the package carries no deprecation flag. What ended is access: Google announced on May 19, 2026 that it was transitioning Gemini CLI to Antigravity CLI, and on June 18, 2026 Gemini CLI and the Gemini Code Assist IDE extensions stopped serving requests for Google AI Pro, Google AI Ultra and free Gemini Code Assist for individuals. Login with Google can no longer be used to reach Gemini CLI.

What replaced Gemini CLI?

Google names Antigravity CLI, whose command is agy, and says consumer Gemini Code Assist users can migrate to the Antigravity family. Two things are worth checking before you treat it as a like-for-like swap. Its GitHub repository, google-antigravity/antigravity-cli, publishes no source code and no licence — the root listing holds a README, a changelog, a demo GIF, an examples directory and a .github directory, with no source tree, and the GitHub API returns a null licence field (checked September 21, 2026) — and it installs as a prebuilt binary from an install script rather than from npm. Gemini CLI, by contrast, is an Apache-2.0 npm package. The absence of a published licence in that repository is what was verified; no separate terms document was read, so this is not a statement that Google has declared the product proprietary.

Can I point Gemini CLI at a third-party API instead?

Only at a Gemini-native one. Gemini CLI's in-repo reference documentation on main documents GOOGLE_GEMINI_BASE_URL as overriding the base URL for Gemini API requests when using gemini-api-key authentication, and requires HTTPS unless the target is localhost. In the released source that URL is passed to the @google/genai SDK as httpOptions.baseUrl with vertexai set to false, so requests still leave as Google's native Gemini protocol, and the auth enum contains no OpenAI-compatible and no Anthropic option. The key rides in an x-goog-api-key header by default, and setting GEMINI_API_KEY_AUTH_MECHANISM to bearer moves it to an Authorization header on the gemini-api-key and vertex-ai paths — a different header, the same wire format. Kunavo serves /v1/chat/completions, /v1/messages and /v1/responses and exposes no Gemini-native surface: probed September 21, 2026, /v1beta/models and /v1beta/models/<model>:generateContent both return 404. Kunavo is therefore not a valid target for GOOGLE_GEMINI_BASE_URL, and the honest move is to change the client rather than the endpoint.

What is the closest alternative to Gemini CLI?

Qwen Code, on lineage rather than on marketing. Its own README states the project was originally based on Google Gemini CLI v0.8.2 and that it stopped syncing with upstream at Qwen Code v0.1 to develop independently as a multi-protocol agent framework, which is why the terminal UI and the settings shape feel familiar. It speaks OpenAI, Anthropic, Gemini and Qwen protocols plus third-party and local providers, configured under modelProviders in ~/.qwen/settings.json. The repository is Apache-2.0 and not archived, and npm @qwen-code/qwen-code 0.24.3 was published September 21, 2026. Lineage is not byte-compatibility: the projects diverged at v0.1, so treat a Gemini CLI settings file as something to port rather than to copy.

Is there a free alternative to Gemini CLI?

The clients are free; the access mostly is not, and that is the trap in this question. Gemini CLI, Qwen Code, Cline and Aider are all Apache-2.0 and cost nothing to install. But Qwen Code's own hosted free path is gone — its authentication documentation states that the Qwen OAuth free tier was discontinued on April 15, 2026 and that Qwen OAuth is no longer a selectable entry in the /auth dialog — so it is a bring-your-own-key escape, never a free one. Google's Gemini API does still advertise a free tier with limited model access and a condition that content is used to improve its products, but that is a separate product from the retired Gemini CLI consumer login and does not bring it back. Antigravity's Individual tier is listed at $0 per month on antigravity.google/pricing (checked September 21, 2026), but read its inclusions narrowly: that tier's list names model access, unlimited tab completions, unlimited command requests and "Basic weekly rate limits" and does not name the CLI, which that page names only under the organization plan via Google Cloud. Its plans page also prints no numeric rate limit for any tier — only wording such as "Meaningful quota, refreshed weekly" — so any specific Antigravity limit you find in a third-party blog is unverified.

Do my GEMINI.md files and MCP servers move to another agent?

Partly, and the part that moves is worth knowing precisely. Gemini CLI reads context files named GEMINI.md by default and lets the context.fileName setting name others, including an array. Qwen Code defaults to QWEN.md and documents context.fileName as a string or array of strings under the same key, so naming GEMINI.md there makes Qwen Code load the file. MCP servers also use the same mcpServers key, in ~/.qwen/settings.json or .qwen/settings.json instead of ~/.gemini/settings.json or .gemini/settings.json. What does not move: Gemini CLI's shell history lives at ~/.gemini/tmp/<project_hash>/shell_history under a hash of the project path, and extensions are installed as Gemini CLI's own copy from a GitHub repository URL or a local path, in its own manifest format, which is not the shape Qwen Code's separate extension system reads. Whether your instructions still land the same way on a different model is your own check, not a file-format question.

Repository and npm status, Google's deprecation and pricing pages, Antigravity's install and plans documentation, and Qwen Code's own configuration docs all checked September 21, 2026; the Kunavo endpoint probe was re-run the same day. Nothing on this page was runtime-tested: no CLI was installed and no session was run against any endpoint. Kunavo token rates come from the live catalog, and the dollar example is illustrative token arithmetic.