What Is Qwen Code? Setup, Is It Free, Which Models It Works With, MCP and Approval Modes
You type qwen in a project folder and describe the job in plain language; Qwen Code reads and edits files, runs commands and explains the result. It's an open-source (Apache-2.0) terminal coding agent from Alibaba's Qwen team; it has no model of its own: it connects with a Qwen account (Plus or Pro subscription), an Alibaba Cloud or QwenCloud key, an OpenAI, Anthropic or Gemini-compatible provider, or a local model such as Ollama. Subagents, skills, MCP and approval modes that draft a plan first are built in; there are also VS Code, Zed and JetBrains extensions and a desktop app.
- What it does
- Coding agent that edits files and runs commands in the terminal
- Type
- Open-source terminal agent (Apache-2.0)
- Model
- No model of its own; subscription, API key or local model
- Where
- Terminal, VS Code, Zed, JetBrains, desktop
- Approval
- Default Auto: doesn't ask for what it deems safe
- Latest release
- 0.28.0 (November 17, 2026)
- Price
- Software is free; the old free Qwen allowance has ended
What is Qwen Code and what does it do?
You want an AI agent to handle repetitive work in a software project (getting to know the repo, fixing bugs, editing files, running tests), but you don't want to be tied to one company's model. Qwen Code is a terminal coding agent built for that: the program that gives the model tools for reading files, editing and running commands, and manages the conversation. Its official description is "the open-source AI coding agent for your terminal, editor, desktop, browser, and chat". Its early versions were derived from Google's Gemini CLI; since version 0.1 it has been developed separately.
Who it's for: developers comfortable in the terminal who want to choose their own model and provider; teams that run open Qwen models on their own servers and want a coding agent for them; developers at small agencies maintaining client sites. Who it's not for: people who don't use a terminal or code editor and want to build a site without writing code.
Sources: README ("Why Qwen Code?", Capabilities, Acknowledgments), November 18, 2026.
How do you install Qwen Code? macOS, Linux, Windows, npm
The commands are taken verbatim from the official README. The recommended one-line installer downloads and runs a script from Alibaba's storage address. The npm route requires Node.js 22 or newer; here it's pinned to the latest stable release as of November 18, 2026 (0.28.0). Restart your terminal after installing.
› npm install -g @qwen-code/qwen-code@0.28.0The README's command is npm install -g @qwen-code/qwen-code@latest; 0.28.0 was released on November 17, 2026. Preview releases are published under a separate tag (preview).
› curl -fsSL https://qwen-code-assets.oss-cn-hangzhou.aliyuncs.com/installation/install-qwen-standalone.sh | bash› brew install qwen-code› irm https://qwen-code-assets.oss-cn-hangzhou.aliyuncs.com/installation/install-qwen-standalone.ps1 | iexThe VS Code extension (Beta, VS Code 1.96 or later) is on the Visual Studio Code Marketplace (qwenlm.qwen-code-vscode-ide-companion); Zed and JetBrains have separate setup pages. The macOS, Windows and Linux desktop app is downloaded from the GitHub releases. From the terminal, qwen serve --open opens the experimental web interface.
- Start it in the project folder: Go to the folder with
cdand typeqwen. - Connect the model: On first launch or with
/auth, choose a sign-in route: Qwen account (subscription), QwenCloud, Alibaba ModelStudio, a third-party provider or a custom provider. Details in the "Which models" section below. - Write your first request: The first request the README suggests: "Explain this repository and show me where to start."
Sources: README (Installation, Quick Start, How to Use), VS Code integration doc, npm registry (November 18, 2026).
How do you use Qwen Code? What you type, what you get
The requests below come from the examples in the official README and docs; the results are described only as far as the docs describe them. You can also write requests in Turkish; the reply language depends on the model you connect and the /language output setting.
› /plan refactor the auth moduleWhat you get: in Plan mode, Qwen Code reviews the code using read-only operations and writes a step-by-step change plan; it doesn't edit files or run commands. If you like the plan, you return to the previous mode with /plan exit and have it carried out.
› qwen -p "Summarize the repository layout."What you get: the reply is written to the terminal without opening the interactive interface; it's used in scripts, CI or batch jobs. Because browser sign-in can't be completed in these environments, the official docs recommend an API-key sign-in route. According to the docs, the default approval mode for these runs is Ask Permissions; for jobs that need file edits or commands, set the approval mode explicitly with --approval-mode.
/resume returns to a previous session; /goal keeps the session working until an independent verifier accepts the result; /loop re-runs a request on an interval. With qwen serve it runs as a background service, and the browser, editor or SDK connect to the same sessions (experimental). It can connect to Telegram, DingTalk, WeChat, email or GitHub channels and take work from there with qwen channel start.
Sources: README (Quick Start, How to Use, Daemon Mode, Capabilities), Approval Mode doc (November 18, 2026).
Which models does Qwen Code work with? Sign-in routes and plans
Qwen Code has no model of its own. On first launch or with the /auth command, you choose one of five sign-in routes; within a session you switch models with /model. The moment you switch, usage limits, fees and data terms switch to that provider's.
| Sign-in route | What you need | Note (official docs) |
|---|---|---|
| Qwen account (Qwen OAuth) | An active Plus or Pro subscription on chat.qwen.ai | Browser sign-in; quota depends on the subscription plan. The old free allowance ended on April 15, 2026 |
| QwenCloud | A Token Plan key or a pay-as-you-go API key | The China or International platform is chosen explicitly; built-in web search is enabled |
| Alibaba ModelStudio | A Coding Plan, Token Plan or standard API key | Coding Plan has a fixed monthly fee and a weekly quota; models: qwen3.5-plus, qwen3.6-plus, qwen3.7-plus, qwen3-coder-plus, qwen3-coder-next, qwen3-max-2026-01-23, glm-5, glm-4.7, kimi-k2.5, MiniMax-M2.5 |
| Third-party provider | That provider's API key | DeepSeek, Grok, MiniMax, Z.AI, Kimi, Idealab, ModelScope, OpenRouter, Requesty |
| Custom provider / API key | An OpenAI, Anthropic or Gemini-compatible endpoint | OpenAI, Anthropic, Google, Azure OpenAI, Vertex AI, or a local server such as Ollama and vLLM |
Which should you pick? If you already have a chat.qwen.ai Plus or Pro subscription, the Qwen account route works without dealing with keys. If you want a predictable monthly fee, the Alibaba Cloud Coding Plan; if you want to pay for what you use, a QwenCloud or Model Studio standard key. If you don't want your code to leave your computer, a local model running in Ollama or vLLM (including open Qwen models); speed and quality depend on your hardware. If you'll use Claude models, you need an Anthropic API key. The /effort command sets the selected model's thinking level.
› export OPENAI_API_KEY="sk-your-api-key"
export OPENAI_BASE_URL="https://maas.qwencloudapi.com/compatible-mode/v1"
export OPENAI_MODEL="qwen3.8-max"According to the docs, to select OpenAI-compatible sign-in with environment variables alone, you set OPENAI_API_KEY. Provider-specific keys such as QWENCLOUD_API_KEY in the docs' example work only when a provider entry in ~/.qwen/settings.json declares that key as its envKey.
The differences, licenses and API prices of the Qwen models are in the Qwen guide.
!According to Anthropic's Claude Code legal document, third-party apps aren't allowed to offer Claude.ai sign-in. For Claude models in Qwen Code, use an Anthropic API key (Claude Console) or a supported cloud provider.
Checked on November 18, 2026. Sources: the Authentication doc (five sign-in routes, Coding Plan model list, environment variables) and the Terms of Service and Privacy Notice (end of the free allowance). The quota for the Coding Plan and the Qwen Plus/Pro subscription inside Qwen Code is not stated as a number in the official docs; they point to the Alibaba Cloud console and chat.qwen.ai.
Is Qwen Code safe? Approval modes: Plan, Ask Permissions, Auto, YOLO
The approval mode decides how freely Qwen Code works. Within a session, Shift+Tab (Tab on Windows) cycles through the modes; the status bar at the bottom shows which mode you're in.
| Mode | File editing | Commands | When |
|---|---|---|---|
| Plan | None, read-only | Not run | Exploring code, planning changes |
| Ask Permissions | With your approval | With your approval | New or unfamiliar codebases, critical projects |
| Auto-Edit | Approves on its own | With your approval | Everyday edits |
| Auto (default) | A classifier decides | A classifier decides | Long sessions |
| YOLO | Approves on its own | Approves on its own | Only trusted, controlled environments |
The sandbox isn't on by default. On Linux there's a tool sandbox you enable in your user settings after installing bwrap (e.g. writes only to the workspace, network closed); on macOS Seatbelt, and elsewhere Docker or Podman can be used. Wide-ranging edits can be isolated in a temporary git worktree.
qwen serve listens on a local address without authentication by default; any process on that machine can use the API, including code execution. On a shared machine, set QWEN_SERVER_TOKEN and use --require-auth.
Sources: Approval Mode and Sandbox docs, README Daemon Mode (November 18, 2026). This is not a security audit.
MCP, skills, subagents and hooks
MCP (Model Context Protocol) is a common connection format that lets an AI use a service or tool (a database, an internal API, a file store). Qwen Code loads MCP servers from the mcpServers field in settings.json or through the qwen mcp commands.
› qwen mcp add --transport http my-server http://localhost:3000/mcpWhat you get: when Qwen Code opens, typing /mcp lists the server and its tools; you ask the model to use that server's tools. If Qwen Code was already running, restart it in the same project. Allow and deny lists of tools can be set per server.
| What | What it does |
|---|---|
| Subagent | Delegates a focused subtask to another agent with its own context and tools |
| Skill | Built-in skills (/review, /batch, /bugfix); /learn distills new skills from docs or code |
| Auto-Memory | The agent writes its own notes and recalls them in later sessions |
| Hook | Runs your own script before and after tool calls, at session start and end |
| Agent Teams, Arena (experimental) | A lead agent coordinates a team; Arena runs the same task on several models in separate worktrees to compare |
Sources: MCP doc, README Capabilities (November 18, 2026).
Is Qwen Code free? Has the free tier ended?
The software itself is free and open source (Apache-2.0). The money goes to the model. There used to be a free quota when signing in with a Qwen account; according to the official docs, this old free Qwen OAuth allowance ended on April 15, 2026. Today, signing in with a Qwen account requires an active Plus or Pro subscription on chat.qwen.ai. The way to use it for free is a local model (hardware cost only) or another provider's own free tier.
- Using, modifying and distributing it, including commercially (Apache-2.0)
- Removing the license and notice text from copies
- The software is provided without warranty
Sources: LICENSE (Apache-2.0), Terms of Service and Privacy Notice, Authentication (November 18, 2026). The price of the Qwen Plus and Pro subscription is in the Qwen guide. This is not legal advice.
Does Qwen Code work in Turkish?
| InterfaceNo | Built-in interface languages: Chinese, English, Russian, German, Japanese, Portuguese (Brazil), French, Catalan. |
|---|---|
| Turkish requests and repliesUnclear | The /language output command sets the model's reply language (the docs give Chinese, English and Japanese as examples). Turkish reply quality depends on the model you connect; the official sources don't mention Turkish. |
| DocumentationNo | The docs are in English, Chinese and a few other languages; not Turkish. |
Where do my code and data go?
Files read and your requests go to the provider you connect, and its terms apply: the Qwen privacy policy for a Qwen account, Alibaba Cloud's for the Coding Plan, that provider's for your own key. With a local model, nothing leaves your computer.
Anonymous usage statistics and error reports are on by default for all sign-in routes and go to Alibaba Cloud RUM. To turn them off, set "privacy": { "usageStatisticsEnabled": false } or QWEN_USAGE_STATISTICS_ENABLED=false.
Settings and keys can be stored in ~/.qwen/settings.json; keep this file out of repos. In CI, use environment variables.
Sources: Terms of Service and Privacy Notice, Authentication (November 18, 2026).
How do you uninstall Qwen Code?
› npm uninstall -g @qwen-code/qwen-codeIf you installed with Homebrew, brew uninstall qwen-code. Settings, keys and sessions stay in the ~/.qwen folder; for a full cleanup, delete this folder yourself. You cancel the Qwen account subscription separately on chat.qwen.ai.
Qwen Code, Claude Code or Gemini CLI?
The Qwen Code row comes from this page's official sources; the other rows summarize those tools' own guides. This is not a ranking.
Frequently asked questions
Is Qwen Code free?
The software is free and Apache-2.0 licensed. The old free Qwen OAuth allowance ended on April 15, 2026; signing in with a Qwen account now requires a Plus or Pro subscription. To use it for free, you need a local model or another provider's free tier.
How do you install Qwen Code?
With Node.js 22 or later, the npm install -g @qwen-code/qwen-code command; on macOS and Linux, the official installer script or Homebrew; on Windows, the PowerShell installer. Then type qwen in your project folder and connect a model with /auth.
How much does Qwen Code cost?
The tool itself is free. Payment goes to the sign-in route you choose: a Qwen Plus or Pro subscription, an Alibaba Cloud Coding Plan or Token Plan, a pay-as-you-go API key, or another provider's fees.
Does Qwen Code work with Ollama?
Yes. The README says it supports local models such as Ollama and vLLM; an OpenAI-compatible local endpoint is connected as a custom provider. There's no model fee; speed depends on your hardware.
Qwen Code or Claude Code?
Qwen Code is open source and works with multiple providers; Claude Code is Anthropic's own tool and works with a Claude account. In Qwen Code, Claude models require an Anthropic API key.
Does Qwen Code support MCP?
Yes. MCP servers are added with the qwen mcp add command or the mcpServers field in settings.json; the /mcp command shows and manages them.
Does Qwen Code change my files without asking?
In the default Auto mode, a classifier approves edits and commands it considers safe without asking. If you want approval at every step, switch to Ask Permissions; if you only want a plan, Plan mode; Shift+Tab cycles through the modes.
Related guides
Sources
- Qwen Code README
- Qwen Code docs
- Sign-in routes and plans (Authentication)
- Terms of Service and Privacy Notice
- Approval modes
- MCP
- Sandbox
- Commands
- License (Apache-2.0)
- Claude Code legal and compliance (Anthropic; Claude sign-in in third-party apps)
- npm: @qwen-code/qwen-code
Not clear in the official sources: The quota of the Qwen Plus/Pro subscription and the Coding Plan inside Qwen Code (the docs point to the plan pages) · Turkish reply quality (depends on the connected model). Each is covered in the relevant section along with what you can do.





