{"_rev":"3-73ad264e56213c116650d3e688939bce","time":{"created":"2026-02-25T16:28:32.230Z","modified":"2026-02-25T16:28:33.043Z","0.10.5":"2026-02-25T16:08:35.480Z","0.10.5-fork.1":"2026-02-25T16:28:32.853Z"},"_id":"@aattwwss/qwen-code","name":"@aattwwss/qwen-code","dist-tags":{"latest":"0.10.5-fork.1"},"versions":{"0.10.5-fork.1":{"name":"@aattwwss/qwen-code","version":"0.10.5-fork.1","description":"Qwen Code - AI-powered coding assistant","repository":{"type":"git","url":"git+https://github.com/QwenLM/qwen-code.git"},"type":"module","main":"cli.js","bin":{"qwen":"cli.js"},"config":{"sandboxImageUri":"ghcr.io/qwenlm/qwen-code:0.10.5"},"dependencies":{},"optionalDependencies":{"@lydell/node-pty":"1.1.0","@lydell/node-pty-darwin-arm64":"1.1.0","@lydell/node-pty-darwin-x64":"1.1.0","@lydell/node-pty-linux-x64":"1.1.0","@lydell/node-pty-win32-arm64":"1.1.0","@lydell/node-pty-win32-x64":"1.1.0","@teddyzhu/clipboard":"0.0.5","@teddyzhu/clipboard-darwin-arm64":"0.0.5","@teddyzhu/clipboard-darwin-x64":"0.0.5","@teddyzhu/clipboard-linux-x64-gnu":"0.0.5","@teddyzhu/clipboard-linux-arm64-gnu":"0.0.5","@teddyzhu/clipboard-win32-x64-msvc":"0.0.5","@teddyzhu/clipboard-win32-arm64-msvc":"0.0.5"},"engines":{"node":">=20.0.0"},"_id":"@aattwwss/qwen-code@0.10.5-fork.1","gitHead":"d43ea38efb897af0aa89aedaf2b5467048badc10","bugs":{"url":"https://github.com/QwenLM/qwen-code/issues"},"homepage":"https://github.com/QwenLM/qwen-code#readme","_nodeVersion":"20.20.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-eDtDGHuMd1CWWOWBCYAA0vF2CgeUvFIMUI9nFPzrawtyhE9DoW5tpjjA0gUlelhIwMRBw9dnlyKrhKgqz7pN/w==","shasum":"bb2f4686d48e03d938f7640ac78217479300ac1e","tarball":"https://registry.npmjs.org/@aattwwss/qwen-code/-/qwen-code-0.10.5-fork.1.tgz","fileCount":22,"unpackedSize":43752761,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDSudrGixdpKtckQdX5ZLVCABrQux4inflm6H+i54TyigIhAJ2iFnNm87NzAn6jK1Rt6bgXLwgMj3Z6GPi2R43LGk2r"}]},"_npmUser":{"name":"aattwwss","email":"alvintan95@gmail.com"},"directories":{},"maintainers":[{"name":"aattwwss","email":"alvintan95@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/qwen-code_0.10.5-fork.1_1772036912338_0.9739417947889728"},"_hasShrinkwrap":false}},"maintainers":[{"name":"aattwwss","email":"alvintan95@gmail.com"}],"description":"Qwen Code - AI-powered coding assistant","homepage":"https://github.com/QwenLM/qwen-code#readme","repository":{"type":"git","url":"git+https://github.com/QwenLM/qwen-code.git"},"bugs":{"url":"https://github.com/QwenLM/qwen-code/issues"},"readme":"<div align=\"center\">\n\n[![npm version](https://img.shields.io/npm/v/@qwen-code/qwen-code.svg)](https://www.npmjs.com/package/@qwen-code/qwen-code)\n[![License](https://img.shields.io/github/license/QwenLM/qwen-code.svg)](./LICENSE)\n[![Node.js Version](https://img.shields.io/badge/node-%3E%3D20.0.0-brightgreen.svg)](https://nodejs.org/)\n[![Downloads](https://img.shields.io/npm/dm/@qwen-code/qwen-code.svg)](https://www.npmjs.com/package/@qwen-code/qwen-code)\n\n<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>\n\n**An open-source AI agent that lives in your terminal.**\n\n<a href=\"https://qwenlm.github.io/qwen-code-docs/zh/users/overview\">中文</a> |\n<a href=\"https://qwenlm.github.io/qwen-code-docs/de/users/overview\">Deutsch</a> |\n<a href=\"https://qwenlm.github.io/qwen-code-docs/fr/users/overview\">français</a> |\n<a href=\"https://qwenlm.github.io/qwen-code-docs/ja/users/overview\">日本語</a> |\n<a href=\"https://qwenlm.github.io/qwen-code-docs/ru/users/overview\">Русский</a> |\n<a href=\"https://qwenlm.github.io/qwen-code-docs/pt-BR/users/overview\">Português (Brasil)</a>\n\n</div>\n\n> 🎉 **News (2026-02-16)**: Qwen3.5-Plus is now live! Sign in via Qwen OAuth to use it directly, or get an API key from [Alibaba Cloud ModelStudio](https://modelstudio.console.alibabacloud.com?tab=doc#/doc/?type=model&url=2840914_2&modelId=group-qwen3.5-plus) to access it through the OpenAI-compatible API.\n\nQwen Code is an open-source AI agent for the terminal, optimized for [Qwen3-Coder](https://github.com/QwenLM/Qwen3-Coder). It helps you understand large codebases, automate tedious work, and ship faster.\n\n![](https://gw.alicdn.com/imgextra/i1/O1CN01D2DviS1wwtEtMwIzJ_!!6000000006373-2-tps-1600-900.png)\n\n## Why Qwen Code?\n\n- **Multi-protocol, OAuth free tier**: use OpenAI / Anthropic / Gemini-compatible APIs, or sign in with Qwen OAuth for 1,000 free requests/day.\n- **Open-source, co-evolving**: both the framework and the Qwen3-Coder model are open-source—and they ship and evolve together.\n- **Agentic workflow, feature-rich**: rich built-in tools (Skills, SubAgents) for a full agentic workflow and a Claude Code-like experience.\n- **Terminal-first, IDE-friendly**: built for developers who live in the command line, with optional integration for VS Code, Zed, and JetBrains IDEs.\n\n## Installation\n\n### Quick Install (Recommended)\n\n#### Linux / macOS\n\n```bash\ncurl -fsSL https://qwen-code-assets.oss-cn-hangzhou.aliyuncs.com/installation/install-qwen.sh | bash\n```\n\n#### Windows (Run as Administrator CMD)\n\n```cmd\ncurl -fsSL -o %TEMP%\\install-qwen.bat https://qwen-code-assets.oss-cn-hangzhou.aliyuncs.com/installation/install-qwen.bat && %TEMP%\\install-qwen.bat\n```\n\n> **Note**: It's recommended to restart your terminal after installation to ensure environment variables take effect.\n\n### Manual Installation\n\n#### Prerequisites\n\nMake sure you have Node.js 20 or later installed. Download it from [nodejs.org](https://nodejs.org/en/download).\n\n#### NPM\n\n```bash\nnpm install -g @qwen-code/qwen-code@latest\n```\n\n#### Homebrew (macOS, Linux)\n\n```bash\nbrew install qwen-code\n```\n\n#### Alternative: Install from Fork\n\nTo install this fork with additional features:\n\n```bash\nnpm install -g @aattwwss/qwen-code\n```\n\n## Quick Start\n\n```bash\n# Start Qwen Code (interactive)\nqwen\n\n# Then, in the session:\n/help\n/auth\n```\n\nOn first use, you'll be prompted to sign in. You can run `/auth` anytime to switch authentication methods.\n\nExample prompts:\n\n```text\nWhat does this project do?\nExplain the codebase structure.\nHelp me refactor this function.\nGenerate unit tests for this module.\n```\n\n<details>\n<summary>Click to watch a demo video</summary>\n\n<video src=\"https://cloud.video.taobao.com/vod/HLfyppnCHplRV9Qhz2xSqeazHeRzYtG-EYJnHAqtzkQ.mp4\" controls>\nYour browser does not support the video tag.\n</video>\n\n</details>\n\n## Authentication\n\nQwen Code supports two authentication methods:\n\n- **Qwen OAuth (recommended & free)**: sign in with your `qwen.ai` account in a browser.\n- **API-KEY**: use an API key to connect to any supported provider (OpenAI, Anthropic, Google GenAI, Alibaba Cloud Bailian, and other compatible endpoints).\n\n#### Qwen OAuth (recommended)\n\nStart `qwen`, then run:\n\n```bash\n/auth\n```\n\nChoose **Qwen OAuth** and complete the browser flow. Your credentials are cached locally so you usually won't need to log in again.\n\n> **Note:** In non-interactive or headless environments (e.g., CI, SSH, containers), you typically **cannot** complete the OAuth browser login flow. In these cases, please use the API-KEY authentication method.\n\n#### API-KEY (flexible)\n\nUse this if you want more flexibility over which provider and model to use. Supports multiple protocols:\n\n- **OpenAI-compatible**: Alibaba Cloud Bailian, ModelScope, OpenAI, OpenRouter, and other OpenAI-compatible providers\n- **Anthropic**: Claude models\n- **Google GenAI**: Gemini models\n\nThe **recommended** way to configure models and providers is by editing `~/.qwen/settings.json` (create it if it doesn't exist). This file lets you define all available models, API keys, and default settings in one place.\n\n##### Quick Setup in 3 Steps\n\n**Step 1:** Create or edit `~/.qwen/settings.json`\n\nHere is a complete example:\n\n```json\n{\n  \"modelProviders\": {\n    \"openai\": [\n      {\n        \"id\": \"qwen3-coder-plus\",\n        \"name\": \"qwen3-coder-plus\",\n        \"baseUrl\": \"https://dashscope.aliyuncs.com/compatible-mode/v1\",\n        \"description\": \"Qwen3-Coder via Dashscope\",\n        \"envKey\": \"DASHSCOPE_API_KEY\"\n      }\n    ]\n  },\n  \"env\": {\n    \"DASHSCOPE_API_KEY\": \"sk-xxxxxxxxxxxxx\"\n  },\n  \"security\": {\n    \"auth\": {\n      \"selectedType\": \"openai\"\n    }\n  },\n  \"model\": {\n    \"name\": \"qwen3-coder-plus\"\n  }\n}\n```\n\n**Step 2:** Understand each field\n\n| Field                        | What it does                                                                                                                          |\n| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |\n| `modelProviders`             | Declares which models are available and how to connect to them. Keys like `openai`, `anthropic`, `gemini` represent the API protocol. |\n| `modelProviders[].id`        | The model ID sent to the API (e.g. `qwen3-coder-plus`, `gpt-4o`).                                                                     |\n| `modelProviders[].envKey`    | The name of the environment variable that holds your API key.                                                                         |\n| `modelProviders[].baseUrl`   | The API endpoint URL (required for non-default endpoints).                                                                            |\n| `env`                        | A fallback place to store API keys (lowest priority; prefer `.env` files or `export` for sensitive keys).                             |\n| `security.auth.selectedType` | The protocol to use on startup (`openai`, `anthropic`, `gemini`, `vertex-ai`).                                                        |\n| `model.name`                 | The default model to use when Qwen Code starts.                                                                                       |\n\n**Step 3:** Start Qwen Code — your configuration takes effect automatically:\n\n```bash\nqwen\n```\n\nUse the `/model` command at any time to switch between all configured models.\n\n##### More Examples\n\n<details>\n<summary>Coding Plan (Alibaba Cloud Bailian) — fixed monthly fee, higher quotas</summary>\n\n```json\n{\n  \"modelProviders\": {\n    \"openai\": [\n      {\n        \"id\": \"qwen3.5-plus\",\n        \"name\": \"qwen3.5-plus (Coding Plan)\",\n        \"baseUrl\": \"https://coding.dashscope.aliyuncs.com/v1\",\n        \"description\": \"qwen3.5-plus with thinking enabled from Bailian Coding Plan\",\n        \"envKey\": \"BAILIAN_CODING_PLAN_API_KEY\",\n        \"generationConfig\": {\n          \"extra_body\": {\n            \"enable_thinking\": true\n          }\n        }\n      },\n      {\n        \"id\": \"qwen3-coder-plus\",\n        \"name\": \"qwen3-coder-plus (Coding Plan)\",\n        \"baseUrl\": \"https://coding.dashscope.aliyuncs.com/v1\",\n        \"description\": \"qwen3-coder-plus from Bailian Coding Plan\",\n        \"envKey\": \"BAILIAN_CODING_PLAN_API_KEY\"\n      },\n      {\n        \"id\": \"qwen3-coder-next\",\n        \"name\": \"qwen3-coder-next (Coding Plan)\",\n        \"baseUrl\": \"https://coding.dashscope.aliyuncs.com/v1\",\n        \"description\": \"qwen3-coder-next with thinking enabled from Bailian Coding Plan\",\n        \"envKey\": \"BAILIAN_CODING_PLAN_API_KEY\",\n        \"generationConfig\": {\n          \"extra_body\": {\n            \"enable_thinking\": true\n          }\n        }\n      },\n      {\n        \"id\": \"glm-4.7\",\n        \"name\": \"glm-4.7 (Coding Plan)\",\n        \"baseUrl\": \"https://coding.dashscope.aliyuncs.com/v1\",\n        \"description\": \"glm-4.7 with thinking enabled from Bailian Coding Plan\",\n        \"envKey\": \"BAILIAN_CODING_PLAN_API_KEY\",\n        \"generationConfig\": {\n          \"extra_body\": {\n            \"enable_thinking\": true\n          }\n        }\n      },\n      {\n        \"id\": \"kimi-k2.5\",\n        \"name\": \"kimi-k2.5 (Coding Plan)\",\n        \"baseUrl\": \"https://coding.dashscope.aliyuncs.com/v1\",\n        \"description\": \"kimi-k2.5 with thinking enabled from Bailian Coding Plan\",\n        \"envKey\": \"BAILIAN_CODING_PLAN_API_KEY\",\n        \"generationConfig\": {\n          \"extra_body\": {\n            \"enable_thinking\": true\n          }\n        }\n      }\n    ]\n  },\n  \"env\": {\n    \"BAILIAN_CODING_PLAN_API_KEY\": \"sk-xxxxxxxxxxxxx\"\n  },\n  \"security\": {\n    \"auth\": {\n      \"selectedType\": \"openai\"\n    }\n  },\n  \"model\": {\n    \"name\": \"qwen3-coder-plus\"\n  }\n}\n```\n\n> Subscribe to the Coding Plan and get your API key at [Alibaba Cloud Bailian](https://modelstudio.console.aliyun.com/?tab=dashboard#/efm/coding_plan).\n\n</details>\n\n<details>\n<summary>Multiple providers (OpenAI + Anthropic + Gemini)</summary>\n\n```json\n{\n  \"modelProviders\": {\n    \"openai\": [\n      {\n        \"id\": \"gpt-4o\",\n        \"name\": \"GPT-4o\",\n        \"envKey\": \"OPENAI_API_KEY\",\n        \"baseUrl\": \"https://api.openai.com/v1\"\n      }\n    ],\n    \"anthropic\": [\n      {\n        \"id\": \"claude-sonnet-4-20250514\",\n        \"name\": \"Claude Sonnet 4\",\n        \"envKey\": \"ANTHROPIC_API_KEY\"\n      }\n    ],\n    \"gemini\": [\n      {\n        \"id\": \"gemini-2.5-pro\",\n        \"name\": \"Gemini 2.5 Pro\",\n        \"envKey\": \"GEMINI_API_KEY\"\n      }\n    ]\n  },\n  \"env\": {\n    \"OPENAI_API_KEY\": \"sk-xxxxxxxxxxxxx\",\n    \"ANTHROPIC_API_KEY\": \"sk-ant-xxxxxxxxxxxxx\",\n    \"GEMINI_API_KEY\": \"AIzaxxxxxxxxxxxxx\"\n  },\n  \"security\": {\n    \"auth\": {\n      \"selectedType\": \"openai\"\n    }\n  },\n  \"model\": {\n    \"name\": \"gpt-4o\"\n  }\n}\n```\n\n</details>\n\n<details>\n<summary>Enable thinking mode (for supported models like qwen3.5-plus)</summary>\n\n```json\n{\n  \"modelProviders\": {\n    \"openai\": [\n      {\n        \"id\": \"qwen3.5-plus\",\n        \"name\": \"qwen3.5-plus (thinking)\",\n        \"envKey\": \"DASHSCOPE_API_KEY\",\n        \"baseUrl\": \"https://dashscope.aliyuncs.com/compatible-mode/v1\",\n        \"generationConfig\": {\n          \"extra_body\": {\n            \"enable_thinking\": true\n          }\n        }\n      }\n    ]\n  },\n  \"env\": {\n    \"DASHSCOPE_API_KEY\": \"sk-xxxxxxxxxxxxx\"\n  },\n  \"security\": {\n    \"auth\": {\n      \"selectedType\": \"openai\"\n    }\n  },\n  \"model\": {\n    \"name\": \"qwen3.5-plus\"\n  }\n}\n```\n\n</details>\n\n> **Tip:** You can also set API keys via `export` in your shell or `.env` files, which take higher priority than `settings.json` → `env`. See the [authentication guide](https://qwenlm.github.io/qwen-code-docs/en/users/configuration/auth/) for full details.\n\n> **Security note:** Never commit API keys to version control. The `~/.qwen/settings.json` file is in your home directory and should stay private.\n\n## Usage\n\nAs an open-source terminal agent, you can use Qwen Code in four primary ways:\n\n1. Interactive mode (terminal UI)\n2. Headless mode (scripts, CI)\n3. IDE integration (VS Code, Zed)\n4. TypeScript SDK\n\n#### Interactive mode\n\n```bash\ncd your-project/\nqwen\n```\n\nRun `qwen` in your project folder to launch the interactive terminal UI. Use `@` to reference local files (for example `@src/main.ts`).\n\n#### Headless mode\n\n```bash\ncd your-project/\nqwen -p \"your question\"\n```\n\nUse `-p` to run Qwen Code without the interactive UI—ideal for scripts, automation, and CI/CD. Learn more: [Headless mode](https://qwenlm.github.io/qwen-code-docs/en/users/features/headless).\n\n#### IDE integration\n\nUse Qwen Code inside your editor (VS Code, Zed, and JetBrains IDEs):\n\n- [Use in VS Code](https://qwenlm.github.io/qwen-code-docs/en/users/integration-vscode/)\n- [Use in Zed](https://qwenlm.github.io/qwen-code-docs/en/users/integration-zed/)\n- [Use in JetBrains IDEs](https://qwenlm.github.io/qwen-code-docs/en/users/integration-jetbrains/)\n\n#### TypeScript SDK\n\nBuild on top of Qwen Code with the TypeScript SDK:\n\n- [Use the Qwen Code SDK](./packages/sdk-typescript/README.md)\n\n## Commands & Shortcuts\n\n### Session Commands\n\n- `/help` - Display available commands\n- `/clear` - Clear conversation history\n- `/compress` - Compress history to save tokens\n- `/stats` - Show current session information\n- `/bug` - Submit a bug report\n- `/exit` or `/quit` - Exit Qwen Code\n\n### Keyboard Shortcuts\n\n- `Ctrl+C` - Cancel current operation\n- `Ctrl+D` - Exit (on empty line)\n- `Up/Down` - Navigate command history\n\n> Learn more about [Commands](https://qwenlm.github.io/qwen-code-docs/en/users/features/commands/)\n>\n> **Tip**: In YOLO mode (`--yolo`), vision switching happens automatically without prompts when images are detected. Learn more about [Approval Mode](https://qwenlm.github.io/qwen-code-docs/en/users/features/approval-mode/)\n\n## Configuration\n\nQwen Code can be configured via `settings.json`, environment variables, and CLI flags.\n\n| File                    | Scope         | Description                                                                             |\n| ----------------------- | ------------- | --------------------------------------------------------------------------------------- |\n| `~/.qwen/settings.json` | User (global) | Applies to all your Qwen Code sessions. **Recommended for `modelProviders` and `env`.** |\n| `.qwen/settings.json`   | Project       | Applies only when running Qwen Code in this project. Overrides user settings.           |\n\nThe most commonly used top-level fields in `settings.json`:\n\n| Field                        | Description                                                                                          |\n| ---------------------------- | ---------------------------------------------------------------------------------------------------- |\n| `modelProviders`             | Define available models per protocol (`openai`, `anthropic`, `gemini`, `vertex-ai`).                 |\n| `env`                        | Fallback environment variables (e.g. API keys). Lower priority than shell `export` and `.env` files. |\n| `security.auth.selectedType` | The protocol to use on startup (e.g. `openai`).                                                      |\n| `model.name`                 | The default model to use when Qwen Code starts.                                                      |\n\n> See the [Authentication](#api-key-flexible) section above for complete `settings.json` examples, and the [settings reference](https://qwenlm.github.io/qwen-code-docs/en/users/configuration/settings/) for all available options.\n\n## Benchmark Results\n\n### Terminal-Bench Performance\n\n| Agent     | Model              | Accuracy |\n| --------- | ------------------ | -------- |\n| Qwen Code | Qwen3-Coder-480A35 | 37.5%    |\n| Qwen Code | Qwen3-Coder-30BA3B | 31.3%    |\n\n## Ecosystem\n\nLooking for a graphical interface?\n\n- [**AionUi**](https://github.com/iOfficeAI/AionUi) A modern GUI for command-line AI tools including Qwen Code\n- [**Gemini CLI Desktop**](https://github.com/Piebald-AI/gemini-cli-desktop) A cross-platform desktop/web/mobile UI for Qwen Code\n\n## Troubleshooting\n\nIf you encounter issues, check the [troubleshooting guide](https://qwenlm.github.io/qwen-code-docs/en/users/support/troubleshooting/).\n\nTo report a bug from within the CLI, run `/bug` and include a short title and repro steps.\n\n## Connect with Us\n\n- Discord: https://discord.gg/ycKBjdNd\n- Dingtalk: https://qr.dingtalk.com/action/joingroup?code=v1,k1,+FX6Gf/ZDlTahTIRi8AEQhIaBlqykA0j+eBKKdhLeAE=&_dt_no_comment=1&origin=1\n\n## Acknowledgments\n\nThis project is based on [Google Gemini CLI](https://github.com/google-gemini/gemini-cli). We acknowledge and appreciate the excellent work of the Gemini CLI team. Our main contribution focuses on parser-level adaptations to better support Qwen-Coder models.\n","readmeFilename":"README.md"}