Kno2gether kno2gether.com ↗ Try Knotie free
Builder Independence Guide

Qwen Code: the free open-source heir to Gemini CLI

Google shut its free Gemini CLI off for consumer plans. Qwen Code is the open-source fork that kept the workflow alive — and made it model-agnostic. Install it, wire OpenAI, Anthropic and Gemini behind one /model switch, migrate off Gemini CLI, and read an honest trust note before you do.

Start free with Knotie
01

What happened to Gemini CLI

On June 18, 2026, Google shut the free Gemini CLI off for everyone on the free, Google AI Pro, and Ultra plans, along with the Gemini Code Assist IDE extensions for individuals. Organisations on Gemini Code Assist Standard/Enterprise, or anyone calling through paid Gemini / Gemini Enterprise API keys, kept access — but the consumer base that ran the free CLI lost it.

Google's designated successor is Antigravity CLI (invoked as agy), a closed-source Go binary built for asynchronous multi-agent workflows. That's a real product — but it's closed source, and if your habits and scripts were built around the open Gemini-CLI workflow, the migration isn't free. This guide is about the open-source landing zone most of that displaced base wasn't pointed to.
Sources below: 9to5Google and The Register on the June 18 shutdown and the Antigravity migration; the wording 'shut down for consumers / retained for paid enterprise' is theirs, not ours.
02

What Qwen Code actually is

Qwen Code (github.com/QwenLM/qwen-code) is an open-source AI coding agent that lives in your terminal. Its own README states it was originally based on Google Gemini CLI v0.8.2 — a fork — and that the team then stopped syncing with upstream and developed it independently. So it isn't a Google product and it isn't Google's official successor; it's the community/Alibaba-maintained continuation of the open Gemini-CLI workflow.

It's past ~25,000 GitHub stars (directional — a star is interest, not a guarantee of fit). What makes it worth a builder's attention isn't the star count; it's the architecture below.
Attribution: 'originally based on Google Gemini CLI v0.8.2' is a direct quote from the Qwen Code README acknowledgements. Star count is approximate and moves daily.
03

The part that matters: it's model-agnostic

Gemini CLI ran Google's models. Qwen Code is not locked to Qwen — despite the name. Through the modelProviders setting in settings.json, it supports OpenAI, Anthropic, Gemini and Qwen APIs (plus any third-party or local model via Ollama / vLLM), and you switch between them at runtime with the /model command — mid-task, on your own API keys.
  • Bring your own keys. Each provider is configured with its own API key via an env var — you run on accounts you control, not a vendor's metered free tier that can be switched off.
  • Switch live with /model. Start a task on one provider, move it to another without leaving the session. (Note: some users have reported rough edges switching mid-session on certain provider combos — see the repo issues; treat it as 'switchable, occasionally finicky', not flawless.)
  • Same terminal workflow. Because it's a Gemini-CLI fork, the muscle memory — the commands, the flow — carries over. That's the whole point of a 'landing zone'.
Verified against the Qwen Code docs (Model Providers + Authentication pages). The provider keys must be valid auth types (openai, anthropic, gemini, qwen).
04

Two things it added that Gemini CLI didn't have

Beyond multi-provider support, Qwen Code shipped capabilities that go past the original:
  • Computer use (desktop automation). It can drive your desktop — click around the screen, open a browser, move files — not just read and edit code in the repo. Listed as a supported capability in the README.
  • Scheduled / /loop tasks. A built-in /loop skill schedules a prompt to re-run on an interval. Be precise about what this is: per the docs, these tasks are session-scoped — they run while the Qwen Code session is open and stop when you exit (recurring tasks also auto-expire after 7 days). For durable, machine-restart-surviving scheduling you use the OS scheduler or CI (e.g. cron / GitHub Actions) to launch it. So it's 'in-session automation', not a always-on background daemon.
Source: Qwen Code README (Computer Use) and the 'Run Prompts on a Schedule' docs page, which explicitly states tasks are session-scoped and expire. We flag this so you don't expect an unattended nightly daemon out of the box.
05

Install + wire all three providers (the one config block)

The fast path — install, then point it at OpenAI, Anthropic and Gemini so you can hop between them with /model:
  1. Install: Qwen Code is distributed as an npm package — install the CLI globally per the repo's README (it requires a recent Node.js). Then run qwen in your project directory.
  2. Add your keys as env vars: export the keys you own — e.g. OPENAI_API_KEY, ANTHROPIC_API_KEY, and a Gemini key — in your shell so the config can reference them by name (never hard-code keys into the file).
  3. Define the providers in settings.json: under modelProviders, add one entry per provider. Each entry needs an id whose key is a valid auth type (openai / anthropic / gemini / qwen) and an envKey pointing at the env var above; optional name, baseUrl, generationConfig.
  4. Switch at runtime: inside a session, run /model and pick the provider/model you want — it changes the active model mid-task.
Exact field names + a worked settings.json example are on the Qwen Code 'Model Providers' docs page (qwenlm.github.io/qwen-code-docs). Always copy the current schema from the official docs — fields evolve.
06

Migrate off Gemini CLI — a short checklist

If your work was wired to Gemini CLI, here's the order that keeps the disruption small:
  • 1. Inventory what called gemini. grep your shell scripts, Makefiles, CI jobs and aliases for the gemini command — those are what broke on June 18.
  • 2. Install Qwen Code alongside, don't rip-and-replace. Get qwen working in one project first; keep your old config around until parity is confirmed.
  • 3. Re-point your default provider to a key you own. This is the upgrade — instead of Google's metered tier, run on your own OpenAI/Anthropic/Gemini key so no one can switch your access off again.
  • 4. Re-create your most-used flows (the prompts/commands you ran daily) and confirm output parity before swapping any automation over.
  • 5. Decide Antigravity vs Qwen Code per use-case. Google's Antigravity CLI is the official closed-source path; Qwen Code is the open, model-agnostic one. They're not mutually exclusive — a lot of teams will keep both.
This checklist is operational guidance, not a Qwen Code feature claim. The 'install alongside' order is the cheap-insurance way to migrate any tool.
07

The honest trust / supply-chain note (read before a work install)

Being fair cuts both ways — the upside is real, and so is this caveat. Qwen Code is built by the team behind Alibaba's Qwen models (a major Chinese technology company), and it ships with out-of-the-box integrations into chat platforms including Feishu/Lark, DingTalk and WeChat, with assets hosted on Alibaba Cloud (OSS). None of that is inherently malicious — but for a regulated org or anyone handling sensitive code, provenance and data-egress paths matter.
  • It's open source — use that. You (or your security team) can read the code, pin a reviewed version, and audit what the IM integrations and telemetry actually send.
  • Run it on your own keys, in a sandbox. Don't point it at production secrets or a customer's repo on day one. A scoped working directory + your own API keys keeps the blast radius small.
  • Clear it with security if you're in a strict shop. Some organisations restrict China-adjacent tooling by policy. That's a procurement/compliance call, not a code-quality judgement — make it consciously rather than discovering it later.
This is presented as fair disclosure, not fear: the integrations (Feishu/Lark, DingTalk, WeChat) and Alibaba Cloud asset hosting are documented in the repo. We surface it so you can make an informed call, the same way you'd vet any new dependency.
08

The bigger principle (why this is on a Kno2gether guide)

The takeaway isn't 'everyone switch to Qwen Code.' It's the pattern the Gemini-CLI shutdown exposed: don't wire your work to a single lab's switch they can flip. In one quarter, the access terms on more than one major lab's tooling changed. The durable defence is to run on your own API keys, on a harness that speaks every provider, so a pricing change or a sunset at one lab is a config edit — not a workflow outage.
This is the same provider-agnostic stance we apply when we build and resell AI: multi-provider by default.

Get the next drop

New AI build guides + the occasional bonus template. No spam, unsubscribe anytime.

By submitting you agree to our Privacy Policy & Terms. Unsubscribe anytime.

Frequently asked questions

Did Google really shut Gemini CLI down?
Yes — on June 18, 2026 the free Gemini CLI and the Gemini Code Assist IDE extensions stopped serving requests for free, Google AI Pro, and Ultra users. Organisations on Code Assist Standard/Enterprise or paid Gemini API keys retained access. Google's official replacement is the closed-source Antigravity CLI.
Is Qwen Code just for Qwen models?
No. Despite the name, it's model-agnostic. Via the modelProviders setting it runs OpenAI, Anthropic, Gemini and Qwen APIs (and local models via Ollama/vLLM), and you switch between them at runtime with the /model command, on your own keys.
Is Qwen Code an official Gemini CLI successor?
No. Google's official successor is Antigravity CLI (closed source). Qwen Code is a community/Alibaba-maintained open-source fork — its README says it was originally based on Gemini CLI v0.8.2, then developed independently.
Does its /loop run tasks like a background cron daemon?
Not by default. Per the docs, /loop scheduled tasks are session-scoped — they run while the Qwen Code session is open and stop when you exit (and auto-expire after 7 days). For durable, restart-surviving scheduling, launch it from your OS scheduler or CI (cron / GitHub Actions).
Should I worry that it's from an Alibaba team?
Make it a conscious call, not a reflex. It's open source, so you can audit it; it ships IM integrations (Feishu/Lark, DingTalk, WeChat) and uses Alibaba Cloud hosting. Run it on your own keys in a sandbox, and clear it with security if you're in a regulated or strict-IT environment.
What's the safest way to migrate from Gemini CLI?
Install Qwen Code alongside your existing setup, get it working in one project, re-point your default provider to a key you own, re-create your daily flows and confirm parity, then swap automation over. Don't rip-and-replace in one move.

Want this running under YOUR brand?

Knotie is a white-label AI platform — resell voice agents, chat agents, and automations under your own brand, your domain, your prices. Built-in credit billing means you keep the margin. Start free.

Start free with Knotie