QwenLM/qwen-code
An open-source AI coding agent that lives in your terminal.
Qwen Code – an open‑source AI coding agent
What it is – Qwen Code is a command‑line / desktop / web / IDE / chat‑bot agent that lets you interact with large language models (OpenAI, Anthropic, Gemini, Qwen and any local model via Ollama/vLLM) to write, explain, refactor, and debug code. It ships as a single executable (qwen) plus optional UI integrations and language‑specific SDKs.
Why it matters – It aims to be a fully‑featured, self‑hosting alternative to commercial “coding‑assistant” products (e.g., Claude Code). The framework and the underlying Qwen models are both open‑source, so you can run the whole stack locally without vendor lock‑in.
Core capabilities
| Feature | What you get |
|---|---|
| Agentic workflow | Auto‑memory, auto‑skills, sub‑agents, agent teams, dynamic plans, and a “sandbox” mode that can execute multi‑step coding tasks without manual prompting. |
| Multi‑protocol model support | Switch at runtime between OpenAI, Anthropic, Gemini, Qwen, or any compatible API (Ollama, vLLM, etc.). |
| Rich integrations | Terminal (qwen), desktop app (macOS/Windows/Linux), web UI (qwen serve), IDE plugins for VS Code, JetBrains, Zed, and chat channels (Telegram, DingTalk, WeChat, Feishu). |
| Headless / SDK | Run qwen -p "…" in scripts or CI, or embed the agent via TypeScript, Python, or Java SDKs. |
| Built‑in skills | Commands like /review, /batch, /loop, /bugfix, plus LSP integration, Git worktree handling, and computer‑use automation. |
| Agent arena & daemon | Compare multiple model versions on the same task, or run a shared daemon (qwen serve) that serves many clients over HTTP + SSE. |
Getting started
- Install – one‑line script for Linux/macOS, PowerShell script for Windows, or via npm/Homebrew:
curl -fsSL https://qwen-code-assets.oss-cn-hangzhou.aliyuncs.com/installation/install-qwen-standalone.sh | bash # or on Windows irm https://qwen-code-assets.oss-cn-hangzhou.aliyuncs.com/installation/install-qwen-standalone.ps1 | iex - Run – inside any project folder:
Inside the REPL useqwen/authto add your API key, then ask natural‑language questions, e.g.:Explain this repository and show me where to start. - Optional UI – download the desktop binary from the releases page, or start the experimental web UI with
qwen serve --open. - IDE – follow the docs to install the VS Code, JetBrains, or Zed extensions.
- Automation – call the agent from scripts (
qwen -p "...") or use the Python SDK:from qwen_code_sdk import query, is_sdk_result_message async for msg in query("Summarize the repo layout.", {"cwd": "/my/project"}): if is_sdk_result_message(msg): print(msg["result"])
Evaluation snapshot
Qwen Code has been benchmarked on the SWE‑bench_Verified dataset (500 real‑world coding tasks) using the Qwen 3.7 Max model. Across seven released versions the average pass@3 score hovers around 77 %, with pass rates above 84 %. The table below shows the latest numbers:
| Version | Avg Score | Pass Rate | pass@3 |
|---|---|---|---|
| 0.0.14 | 77.80% | 84.6% | 84.6% |
| 0.1.0 | 76.73% | 84.6% | 84.6% |
| 0.5.0 | 76.60% | 83.0% | 83.0% |
| 0.10.0 | 76.47% | 84.4% | 84.4% |
| 0.15.0 | 77.67% | 84.6% | 84.6% |
| 0.19.0 | 76.40% | 85.0% | 85.0% |
| 0.22.0 | 77.33% | 84.4% | 84.4% |
Ecosystem & extensions
- Qwen Code Desktop – official cross‑platform GUI.
- AionUi – a modern GUI that bundles several CLI‑style AI tools.
- Gemini CLI Desktop – another UI wrapper that works with Qwen Code.
- Qwen Code Claw – a skill that lets other agents (Claude, Codex, etc.) delegate work to Qwen Code via the ACP protocol.
- Aliyun Model Studio CLI – adds image/video generation and model deployment capabilities.
License & contribution
The repository is released under the Apache‑2.0 license (see LICENSE). Contributions are welcomed; see CONTRIBUTING.md for the workflow.
Bottom line – Qwen Code provides a self‑hosted, multi‑modal AI coding assistant that can be used from the terminal, inside IDEs, via a desktop app, or through chat platforms, with a strong focus on open‑source models and extensible agentic workflows.
Related
- Project
- Project
- Project
- Project
- Project