العودة إلى المهارات
qwen-code
بواسطة QwenLM
Generic—لم يُقيَّم بعد
تقييمك
موجز
An open-source AI coding agent that lives in your terminal.
الوصف
<div align="center">
[](https://www.npmjs.com/package/@qwen-code/qwen-code)
[](./LICENSE)
[](https://nodejs.org/)
[](https://www.npmjs.com/package/@qwen-code/qwen-code)
<a href="https://trendshift.io/repositories/15287" target="_blank"><img src="https://trendshift.io/api/badge/repositories/15287" alt="QwenLM%2Fqwen-code | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
**The open-source AI coding agent for your terminal, editor, desktop, browser, and chat.**
<a href="https://qwenlm.github.io/qwen-code-docs/zh/users/overview">中文</a> |
<a href="https://qwenlm.github.io/qwen-code-docs/de/users/overview">Deutsch</a> |
<a href="https://qwenlm.github.io/qwen-code-docs/fr/users/overview">français</a> |
<a href="https://qwenlm.github.io/qwen-code-docs/ja/users/overview">日本語</a> |
<a href="https://qwenlm.github.io/qwen-code-docs/ru/users/overview">Русский</a> |
<a href="https://qwenlm.github.io/qwen-code-docs/pt-BR/users/overview">Português (Brasil)</a> |
<a href="https://qwenlm.github.io/qwen-code-docs/ko/users/overview">한국어</a>
</div>

| **Qwen Code 1.0 Preview** |
| :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Qwen Code 1.0 Preview brings together the agent harness capabilities of [Qoder](https://qoder.com/) and Qwen Code in an open-source release.<br><br>[Try Qwen Code 1.0 Preview](https://github.com/QwenLM/qwen-code/tree/v1.0.0-preview) · [Documentation](https://qwenlm.github.io/qwen-code-docs/1.x/) · [中文文档](https://qwenlm.github.io/qwen-code-docs/1.x/zh/users/overview/). |
## Why Qwen Code?
- **Agentic out of the box** — Auto-Memory, Skills, SubAgents, and MCP work from the first session. Agent Teams, Agent Arena, and Dynamic Workflows are built in too — experimental or opt-in, as noted in [Capabilities](#capabilities).
- **Open-source, inside and out** — The framework and the Qwen models are open-source. They evolve together. No vendor lock-in.
- **Multi-protocol** — Supports OpenAI, Anthropic, Gemini, and Qwen APIs. Any third-party provider or local model (Ollama / vLLM). Switch at runtime.
- **Beyond the terminal** — IDE plugins, Desktop app, Web UI, SDKs, and chat integrations (Telegram / DingTalk / WeChat / WeCom / Feishu and more).
> [!TIP]
> Qwen Code is actively iterating on itself — using its own agent and models to file issues, submit PRs, review code, and run tests. Powered by the community, driven by AI.
## Installation
Looking for **Qwen Code 1.0 Preview**? [Get started here](https://github.com/QwenLM/qwen-code/tree/v1.0.0-preview). The instructions below are for the main version.
**Linux / macOS:**
```bash
curl -fsSL https://qwen-code-assets.oss-cn-hangzhou.aliyuncs.com/installation/install-qwen-standalone.sh | bash
```
**Windows:**
```powershell
irm https://qwen-code-assets.oss-cn-hangzhou.aliyuncs.com/installation/install-qwen-standalone.ps1 | iex
```
> Restart your terminal after installation to ensure environment variables take effect.
<details>
<summary>NPM / Homebrew</summary>
**NPM** (requires [Node.js 22+](https://nodejs.org/)):
```bash
npm install -g @qwen-code/qwen-code@latest
```
**Homebrew** (macOS / Linux):
```bash
brew install qwen-code
```
</details>
## Quick Start
Open a terminal in your project and start Qwen Code:
```bash
cd /path/to/your-project
qwen
```
Inside the session, run `/auth` and choose [**Qwen Account with Subscription**](https://chat.qwen.ai/?memberPlan=qwen_code&entry=qwen_code&paywallScene=cli) to sign in with your **Plus or Pro subscription**, or configure a provider with an API key. Then try:
```text
Explain this repository and show me where to start.
```
See the [Authentication Guide](https://qwenlm.github.io/qwen-code-docs/en/users/configuration/auth/) and [Settings Reference](https://qwenlm.github.io/qwen-code-docs/en/users/configuration/settings/) for detailed setup.
<details>
<summary>See the terminal interface</summary>

</details>
## How to Use Qwen Code
Choose the interface that fits your workflow:
| Interface | Get started |
| ------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Terminal** | Run `qwen` in your project — see [Quick Start](#quick-start). |
| **Desktop** | [Download Qwen Code Desktop](https://github.com/QwenLM/qwen-code/releases/tag/desktop-latest) for macOS, Windows, and Linux. |
| **Web** | Run `qwen serve --open` to open the [Web UI](https://qwenlm.github.io/qwen-code-docs/en/users/qwen-serve/) in your browser. _(experimental)_ |
| **Editor** | Set up [VS Code](https://qwenlm.github.io/qwen-code-docs/en/users/integration-vscode/), [Zed](https://qwenlm.github.io/qwen-code-docs/en/users/integration-zed/), or [JetBrains](https://qwenlm.github.io/qwen-code-docs/en/users/integration-jetbrains/). |
| **Chat** | Connect [Telegram](https://qwenlm.github.io/qwen-code-docs/en/users/features/channels/telegram/), [DingTalk](https://qwenlm.github.io/qwen-code-docs/en/users/features/channels/dingtalk/), [WeChat](https://qwenlm.github.io/qwen-code-docs/en/users/features/channels/weixin/), [WeCom](https://qwenlm.github.io/qwen-code-docs/en/users/features/channels/wecom/), [Feishu](https://qwenlm.github.io/qwen-code-docs/en/users/features/channels/feishu/), [QQ Bot](https://qwenlm.github.io/qwen-code-docs/en/users/features/channels/qqbot/), [Email](https://qwenlm.github.io/qwen-code-docs/en/users/features/channels/email/), or [GitHub](https://qwenlm.github.io/qwen-code-docs/en/users/features/channels/github/), then run `qwen channel start`. See the [Channels overview](https://qwenlm.github.io/qwen-code-docs/en/users/features/channels/overview/) for webhook senders and plugin adapters. |
For automation and custom integrations:
- **Headless** — Run `qwen -p "..."` in scripts, CI/CD, or batch jobs.
- **SDKs** — Build with [TypeScript](./packages/sdk-typescript/README.md), [Python](./packages/sdk-python/README.md), or [Java](./packages/sdk-java/qwencode/README.md).
- **Daemon** — Run `qwen serve` to connect clients over HTTP + SSE (ACP). _(experimental)_ [Daemon guide](https://qwenlm.github.io/qwen-code-docs/en/users/qwen-serve/).
- **Computer Use** — Set up [native MCP tools](./packages/cua-driver/README.md#agent-integration) or [Node REPL + SDK](./packages/node-repl/README.md#usage) in Qwen Code, Claude Code, or Codex.
<details>
<summary>SDK example (Python)</summary>
```python
import asyncio
from qwen_code_sdk import is_sdk_result_message, query
async def main() -> None:
result = query(
"Summarize the repository layout.",
{
"cwd": "/path/to/project",
"path_to_qwen_executable": "qwen",
},
)
async for message in result:
if is_sdk_result_message(message):
print(message["result"])
asyncio.run(main())
```
</details>
## Daemon Mode
Run Qwen Code as a long-lived service when you want browser, editor, SDK, and automation clients to share agent sessions without each starting a separate process. The daemon provides the built-in Web Shell and an HTTP + SSE API, supports multiple workspaces, and lets clients reconnect to active sessions.
Start it in the foreground and open the Web Shell:
```bash
qwen serve --open
```
The default address is `http://127.0.0.1:4170`. To run and manage it in the background instead:
```bash
qwen daemon start
qwen daemon status
qwen daemon logs -f
qwen daemon stop
```
By default, the daemon listens on loopback without bearer authentication; any local process that can reach it can use the full API, including code execution. On shared or untrusted hosts, set `QWEN_SERVER_TOKEN` and use `--require-auth`. See the [Daemon guide](./docs/users/qwen-serve.md) for workspaces, authentication, remote access, and the API.
## Capabilities
Qwen Code ships with a complete agent harness — multi-agent orchestration, persistent memory, and deep extensibility, all built in.
### Agentic core
- **[SubAgents](https://qwenlm.github.io/qwen-code-docs/en/users/features/sub-agents/)** — delegate focused subtasks to specialized agents with their own context and toolsets, in the foreground or background.
- **[Agent Teams](https://qwenlm.github.io/qwen-code-docs/en/users/features/multi-agent-coordination/)** _(experimental)_ — a leader coordinates teammates that share a task list and exchange messages, with read-only investigators and an optional single worktree writer.
- **[Agent Arena](https://qwenlm.github.io/qwen-code-docs/en/users/features/arena/)** _(experimental)_ — run the same task on multiple models in isolated Git worktrees, compare solutions side by side, and merge the winner.
- **[Dynamic Workflows](https://qwenlm.github.io/qwen-code-docs/en/users/workflow-mode/)** _(opt-in)_ — the model writes JavaScript workflows that orchestrate agents: parallel fan-out, verification passes, and resumable runs.
- **[Goals](https://qwenlm.github.io/qwen-code-docs/en/users/features/goals/)** — `/goal` keeps the session working across turns until an independent verifier accepts the outcome, within a token budget.
- **[Scheduled tasks](https://qwenlm.github.io/qwen-code-docs/en/users/features/scheduled-tasks/)** — `/loop` and cron tools re-run prompts on an interval or at a set time.
### Memory, skills, and sessions
- **[Auto-Memory](https://qwenlm.github.io/qwen-code-docs/en/users/features/memory/)** — the agent writes its own notes and recalls them across sessions; your `QWEN.md` and `AGENTS.md` briefings load automatically.
- **[Skills & Auto-Skills](https://qwenlm.github.io/qwen-code-docs/en/users/features/skills/)** — built-in skills (`/review`, `/batch`, `/bugfix`…) work out of the box; `/learn` distills docs or code into new skills, the agent can generate skills on its own _(opt-in)_, and `/curator` maintains the library.
- **[Session management](https://qwenlm.github.io/qwen-code-docs/en/users/features/session-overview/)** — resume past conversations with [`/resume`](https://qwenlm.github.io/qwen-code-docs/en/users/features/commands/), and browse, rename, or archive sessions.
### Multimodal
- **[Voice input](https://qwenlm.github.io/qwen-code-docs/en/users/features/voice-input/)** — dictate prompts in the terminal or Web Shell with a configurable ASR model; the Web Shell inserts the transcript for review before sending.
- **[Qwen Live](https://qwenlm.github.io/qwen-code-docs/en/users/features/qwen-live/)** _(experimental)_ — realtime speech-to-speech conversations in the Web Shell that answer directly or hand tasks to the agent, with optional screen sharing.
- **[Image generation](https://qwenlm.github.io/qwen-code-docs/en/users/features/image-generation/)** — the built-in `image_gen` tool turns prompts into PNG artifacts using your configured image model.
### Extensibility and control
- **[Hooks](https://qwenlm.github.io/qwen-code-docs/en/users/features/hooks/)** — run your own scripts at lifecycle events: before and after tool calls, session start and end, and more.
- **[MCP](https://qwenlm.github.io/qwen-code-docs/en/users/features/mcp/)** — connect any Model Context Protocol server to add tools, resources, and prompts.
- **[LSP integration](https://qwenlm.github.io/qwen-code-docs/en/users/features/lsp/)** _(experimental, opt-in)_ — native language-server support: go-to-definition, references, diagnostics, and code actions.
- **[Computer Use & Browser Use](https://qwenlm.github.io/qwen-code-docs/en/users/features/computer-use/)** — automate desktop applications and the browser through native MCP tools.
- **[Plan Mode & approval modes](https://qwenlm.github.io/qwen-code-docs/en/users/features/approval-mode/)** — plan read-only before touching files, then choose per-call confirmation, auto-edit, classifier-driven [Auto Mode](https://qwenlm.github.io/qwen-code-docs/en/users/features/auto-mode/), or YOLO.
- **[Sandbox](https://qwenlm.github.io/qwen-code-docs/en/users/features/sandbox/) & [Git worktrees](https://qwenlm.github.io/qwen-code-docs/en/users/features/worktree/)** — confine tool execution with built-in sandboxing and isolate wide-ranging edits in a temporary worktree.
### Open and multi-platform
- **Open framework and models** — the framework and the Qwen models are open source and evolve together.
- **[Any provider](https://qwenlm.github.io/qwen-code-docs/en/users/configuration/model-providers/)** — OpenAI, Anthropic, Gemini, and Qwen APIs, plus any third-party provider or local model (Ollama / vLLM). Switch at runtime.
- **Every interface** — IDE plugins, desktop app, Web UI, IM channels, headless mode, SDKs, and daemon mode. See [How to Use Qwen Code](#how-to-use-qwen-code).
## Qwen Code Evaluation
On **SWE-bench Verified**, seven Qwen Code versions scored **76.40%–77.80%** on average using the same Qwen 3.7 Max model (500 tasks, three trials per version).

[Full results and evaluation configuration →](./docs/evaluation.md)
## Ecosystem
- [**Qwen Code Desktop**](https://github.com/QwenLM/qwen-code/releases/tag/desktop-latest) — Official desktop app for macOS, Windows, and Linux
- [**AionUi**](https://github.com/iOfficeAI/AionUi) — A modern GUI for command-line AI tools including Qwen Code
- [**Gemini CLI Desktop**](https://github.com/Piebald-AI/gemini-cli-desktop) — A cross-platform desktop/web/mobile UI for Qwen Code
- [**qwen-audio-agent**](https://github.com/QwenAudio/qwen-audio-agent) — Realtime full-duplex voice frontend for Qwen Code over ACP — talk hands-free with barge-in and a local wake word
- [**🦞 Qwen Code Claw**](https://github.com/openclaw/acpx) — Let other agents (Claude, Codex, etc.) delegate coding tasks to Qwen Code via ACP. Paste this prompt into your agent:
```text
Use Qwen Code as a coding agent. First, fetch and read this skill reference:
https://raw.githubusercontent.com/QwenLM/qwen-code/refs/heads/main/.qwen/skills/qwen-code-claw/SKILL.md
Then follow the instructions inside to install, authenticate, and use Qwen Code via acpx for all coding tasks.
```
- [**Aliyun Model Studio CLI**](https://github.com/modelstudioai/cli) — Official CLI for Aliyun's AI platform (`bailian-cli`). Extends Qwen Code with image/video generation, knowledge retrieval, app orchestration, and model deployment
## Privacy
See the [Terms of Service and Privacy Notice](./docs/users/support/tos-privacy.md), including [Chrome extension and Browser Use data handling](./docs/users/support/tos-privacy.md#chrome-extension-and-browser-use).
## Contributing
Contributions are welcome! See [CONTRIBUTING.md](./CONTRIBUTING.md) for guidelines.
## Acknowledgments
This project was originally based on [Google Gemini CLI](https://github.com/google-gemini/gemini-cli) v0.8.2. We gratefully acknowledge the Gemini CLI team's excellent work. Starting from Qwen Code v0.1, we stopped syncing with upstream and began independent development as a multi-protocol, multi-platform agent framework with deep integrations for Qwen models and beyond.
التثبيت
ثبّت المهارة من https://github.com/QwenLM/qwen-codeهذه المهارة غير منشورة في سجلّ ClawHub. الصق النص في وكيل البرمجة لديك — Claude Code أو Cursor أو Codex — وسيثبّت المهارة مباشرةً من المستودع المصدر.
افتح المستودع