Qwen Code: A terminal AI agent that swaps providers at runtime
An open-source AI coding agent that lives in your terminal. **Multi-protocol**, Supports OpenAI, Anthropic, Gemini, and Qwen APIs.
At a glance
- What is it?
- Qwen Code is an open-source, TypeScript-based coding agent for the terminal with multi-protocol support for OpenAI, Anthropic, Gemini, and Qwen APIs. It targets developers who want an agentic workflow without being locked to a single model vendor.
- Who is it for?
- Adopt Qwen Code if you want a terminal-based coding agent that can switch between OpenAI, Anthropic, Gemini, and Qwen models at runtime, and if you prefer an open-source framework with Apache-2.0 licensing. Avoid it if you need a stable, long-term API or if you cannot tolerate the experimental daemon mode or the nightly release cadence.
- Can I use it commercially?
- Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 1 day ago.
- What is it written in?
- Mainly TypeScript, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on September 14, 2026, and from our analysis. They are not legal advice.
DEEP OPEN-SOURCE ANALYSIS
What Qwen Code actually solves
Qwen Code addresses a specific pain: developers who want an AI coding agent in the terminal but do not want to commit to one model provider. The README positions it as an agent that supports OpenAI, Anthropic, Gemini, and Qwen APIs, plus any third-party provider or local model via Ollama or vLLM. The core value is runtime switching. You can start a session with one provider and change to another without reinstalling or reconfiguring the tool. This matters for teams that compare model outputs, or for individuals who use local models for privacy and cloud models for heavy tasks. The project also targets users who want agentic features like subagents, auto-memory, and MCP integration, which are common in tools like Claude Code but often tied to a single vendor. Qwen Code tries to decouple those features from the model backend.
How the multi-protocol mechanism works
The repository layout and README show that Qwen Code is built in TypeScript and distributed as an npm package. The multi-protocol support is not a plugin system but a set of adapters for different API formats. The documentation mentions that you configure your provider and API key inside the session using the /auth command. The agent then translates its internal tool calls and prompts into the format expected by the chosen provider. This is a significant engineering effort because OpenAI, Anthropic, and Gemini have different message schemas, tool-calling conventions, and streaming formats. The README claims feature parity with Claude Code, which suggests the protocol layer handles not just chat but also tool execution, file edits, and subagent spawning. The daemon mode, qwen serve, exposes an HTTP+SSE interface using the Agent Client Protocol (ACP), which lets multiple clients share one agent session. That is a different mechanism from the interactive terminal UI, and the README marks it as experimental.
Installation and first run: real commands
The README gives three installation paths. On Linux or macOS, you run a curl pipe to bash: curl -fsSL https://qwen-code-assets.oss-cn-hangzhou.aliyuncs.com/installation/install-qwen-standalone.sh | bash. On Windows, you use PowerShell: irm https://qwen-code-assets.oss-cn-hangzhou.aliyuncs.com/installation/install-qwen-standalone.ps1 | iex. Alternatively, npm install -g @qwen-code/qwen-code@latest requires Node.js 22 or newer, and Homebrew users can run brew install qwen-code. After installation, the quick start is simply qwen to launch the interactive UI, then /auth to configure your provider and API key. The headless mode uses qwen -p "..." for scripts and CI. The SDK example in the README shows a Python call to query() with a cwd and a path to the qwen executable, which returns an async stream of messages. This is concrete enough to start testing without reading further docs, though the README points to an authentication guide and settings reference for details.
Where it falls short: limitations and wrong-tool cases
The most obvious limitation is the experimental status of the daemon mode, qwen serve. If you rely on a shared agent session over HTTP+SSE for production automation, the README explicitly labels it experimental, which means the API may change or break. Another limitation is the dependency on Node.js 22+ for the npm installation. If your environment uses an older LTS version, the standalone installer may be the only path, and that script comes from an Alibaba Cloud OSS bucket, which could be blocked in some corporate networks. The README also claims feature parity with Claude Code, but parity claims are hard to verify without running both tools side by side. The comparison report is linked from an external repository, not from the project itself, so you cannot confirm the parity from the README alone. Finally, the release cadence includes nightly builds, which suggests the stable branch may not be as stable as the version number implies. If you need a tool that you can set up once and forget, the nightly releases are a warning sign.
Alternatives: how they differ in approach
The README itself names Claude Code as the direct comparison. Claude Code is a proprietary agent from Anthropic, and it is tied to Anthropic models. Qwen Code differs by being open-source under Apache-2.0 and by supporting multiple providers. That is a fundamental difference in approach: Claude Code optimizes for a single model's capabilities, while Qwen Code optimizes for provider flexibility. Another alternative is to use a generic agent framework like LangChain or a local model runner like Ollama with a custom script. Those tools do not provide the terminal UI, subagents, or MCP integration out of the box; you would have to build the agent loop yourself. Qwen Code bundles those features, so the trade-off is between a ready-made but less mature tool versus a DIY approach with more control but more work. The README also mentions IDE plugins and a desktop app, which are not available in a plain script-based setup.
Maintenance, upgrade cost, and licensing
The project is under Apache-2.0, which is permissive for commercial use, but you should read the full license text for any trademark or patent clauses. The repository shows active development with a nightly release on the same day as the stable release, and the last push is recent. That means upgrades come frequently. The upgrade cost is low for npm users because npm install -g @qwen-code/qwen-code@latest will pull the latest stable, but you need to watch for breaking changes in the nightly versions if you track them. The README says the project uses its own agent to file issues and submit PRs, which is a notable maintenance practice but also a risk: the project's development process is partly automated, so human review may be thinner than in a traditional open-source project. The SDKs for TypeScript, Python, and Java suggest a long-term commitment to an API surface, but the experimental daemon mode means that part of the API may change without notice.
Who should adopt it and what to verify first
Qwen Code is a reasonable choice for a developer who wants to evaluate multiple model providers from one terminal tool, or who wants an open-source agent that does not lock them into a vendor. It is also suitable for teams that already use Qwen models and want a first-party agent. It is a poor fit for teams that require a stable, certified API for production automation, given the experimental daemon and nightly releases. Before adopting, verify the authentication flow for your specific provider, because the /auth command may not support every provider equally. Test the headless mode in a CI pipeline to confirm that qwen -p works with your shell environment and that the output parsing is reliable. Check the settings reference for any provider-specific configuration keys. If you plan to use local models via Ollama or vLLM, confirm that the protocol adapter for those endpoints is mature enough for your workload. The README claims broad provider support, but the only way to know if it works for your case is to run it.
Editorial conclusion
Adopt Qwen Code if you want a terminal-based coding agent that can switch between OpenAI, Anthropic, Gemini, and Qwen models at runtime, and if you prefer an open-source framework with Apache-2.0 licensing. Avoid it if you need a stable, long-term API or if you cannot tolerate the experimental daemon mode or the nightly release cadence. Before adopting, verify that the provider you plan to use is fully supported in the current stable release, check the authentication flow for that provider, and test the headless mode in a CI environment to confirm it meets your automation needs.
Community notes