Definition

Qwen Code

Qwen Code is an open-source agentic CLI from Alibaba's Qwen team that runs Qwen models against your repo with tool use and sandboxed execution.

Qwen Code is the Qwen team's open-source agentic coding CLI. It runs in your terminal, uses Alibaba's Qwen models (including Qwen3-Coder) to plan and edit code, and speaks the same kind of tool use loop as Claude Code and Codex CLI. It's forked from the Gemini CLI codebase and adapted for Qwen's API.

Why it matters

Qwen Code is the most visible open-source agentic CLI backed by a frontier open-weights model. For developers who want strong coding performance without sending code to a closed API — or who want to self-host via a compatible inference server — it's one of the few serious options. The Qwen3-Coder family scores competitively on coding benchmarks.

SpaceSpider ships Qwen Code as a first-class option in its CLI picker. Pick it when creating a space and it runs in its own PTY-backed pane like any other agent. See cli-qwen for setup.

How it works

Qwen Code starts an interactive session seeded with a system prompt describing its tools: file read/write, bash execution, glob, grep, and optional web search. Each turn the LLM can emit tool calls, which the CLI executes and feeds back into the context window as observations.

It supports:

  • OpenAI-compatible API endpoints — point it at Qwen's hosted API, DashScope, or a self-hosted vLLM server
  • Configurable approval modes similar to Codex CLI
  • MCP server integration
  • Slash commands for reusable prompts

Configuration lives under ~/.qwen/ or project-local .qwen/ overrides.

How it's used

Qwen Code fits the same slot as other agentic CLIs: you describe a task, it plans, edits, runs, and iterates. Common uses:

  • Running against a local vLLM server for privacy-sensitive code
  • Paired with git worktrees for parallel feature work
  • As a cheaper open-model option alongside Claude Code in SpaceSpider panes

See /alternatives/qwen-code and /compare/claude-code-vs-qwen.

FAQ

What's the difference between Qwen Code and Qwen Chat?

Qwen Chat is the consumer chat product. Qwen Code is the developer CLI that runs agentic coding loops against your local repo, using Qwen models under the hood.

Can Qwen Code run fully offline?

If you self-host a Qwen model with an OpenAI-compatible server (vLLM, llama.cpp, Ollama), yes. With the hosted DashScope endpoint, you need internet access.

Related terms