Qwen Code
Alibaba Qwen's open-source terminal coding agent, originally based on Gemini CLI, which works with Qwen models and OpenAI-, Anthropic- or Gemini-compatible providers. Run it in EnvHaven from any browser, signed in once with your own account, and keep it working 24/7; or install it on your own machine.
Updated November 23, 2026 · Checked against Qwen Code 0.24.6 in EnvHaven v1.9.0
| At a glance | |
|---|---|
| Made by | Alibaba Qwen |
| Command | qwen |
| Version checked | 0.24.6, in EnvHaven v1.9.0 |
| License | Apache-2.0, source |
| Documentation | qwenlm.github.io/qwen-code-docs/en/users/overview/ |
Use Qwen Code in EnvHaven
- Open your workspace in any browser, on a laptop, a tablet or a phone.
- Tap Launch, choose Qwen Code and tap Sign in: it starts Qwen Code, which asks you to sign in the first time. For an API key, choose Set key instead and paste
OPENAI_API_KEY; the workspace keeps it write-only. - Start it with one tap: signed in, Qwen Code gets a green dot in the Launch menu and an icon in the workspace’s top bar. Support is built in (0.24.6), so there is nothing to install or update.
- Give it a task. Runs with the default approval mode; add
--yolofor unattended runs. - Close the tab whenever you like. The workspace is an always-on Linux machine, so Qwen Code keeps working, and every device you open it from shows the same session.
Every agent signs in with your own account: EnvHaven never resells tokens or adds a markup.
Install Qwen Code on another machine
npm (Node.js 22 or later):
npm install -g @qwen-code/qwen-code@latest
Homebrew:
brew install qwen-code
Sign in from the terminal
In a workspace the Launch menu does this for you. On any other machine, or when you would rather type it:
- Inside a session,
/authchooses how to sign in. - For an OpenAI-compatible provider set
OPENAI_API_KEY,OPENAI_BASE_URLandOPENAI_MODEL;ANTHROPIC_API_KEYandGEMINI_API_KEYwork the same way for those providers. - Qwen Plus or Pro through Qwen sign-in (from Qwen Code 0.27; the 0.24.6 build in EnvHaven 1.9.0 predates it), and Alibaba Cloud coding plans.
Run Qwen Code without permission prompts
For one session:
qwen --yolo
Or by approval mode:
qwen --approval-mode yolo
--yolo approves every action automatically and adds no sandbox. Without it, trusted folders start in auto mode, where a model classifies each risky call and approves or blocks it.
In EnvHaven: Runs with the default approval mode; add --yolo for unattended runs. The details, and when full access is safe, are on the Qwen Code full-access page.
Instructions file
Qwen Code reads QWEN.md, AGENTS.md, ~/.qwen/QWEN.md.
Add MCP servers
qwen mcp add <name> <command> [args...]
Servers go to ~/.qwen/settings.json under mcpServers; --scope project writes the project file.
The MCP config converter writes the same server for every agent at once.
Run it from scripts
qwen -p "<prompt>"
Headless runs cannot stop to ask, so they need the full-access setting above.
Qwen Code away from your desk
Qwen Code keeps working only while the machine it runs on is awake. In EnvHaven that machine is the workspace, which never sleeps: start a task, close the laptop and check on it from a phone.
- Qwen Code in the browser
- Qwen Code on iPhone
- Qwen Code on iPad
- Qwen Code on Android
- Qwen Code on a Chromebook
- Qwen Code on Windows
- Qwen Code on a VPS
- Qwen Code in Docker
- Qwen Code on a Raspberry Pi
- Qwen Code 24/7
Alibaba Qwen’s own options:
- Chat channels (Telegram, WeChat, QQ, DingTalk, Feishu and more) through
qwen channel start.
Compare Qwen Code
When Qwen Code misbehaves
- Qwen Code: No auth type is selected
- Qwen Code: You are running Qwen Code in the root directory
- Is Qwen Code down? Live status of the providers it depends on.