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 byAlibaba Qwen
Commandqwen
Version checked0.24.6, in EnvHaven v1.9.0
LicenseApache-2.0, source
Documentationqwenlm.github.io/qwen-code-docs/en/users/overview/

Use Qwen Code in EnvHaven

  1. Open your workspace in any browser, on a laptop, a tablet or a phone.
  2. 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.
  3. 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.
  4. Give it a task. Runs with the default approval mode; add --yolo for unattended runs.
  5. 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, /auth chooses how to sign in.
  • For an OpenAI-compatible provider set OPENAI_API_KEY, OPENAI_BASE_URL and OPENAI_MODEL; ANTHROPIC_API_KEY and GEMINI_API_KEY work 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.

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