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.
Related terms
- Claude Code — closed-source counterpart
- Codex CLI — OpenAI's open-source agent
- Kimi CLI — another open-model CLI
- Agentic coding — the broader category
- LLM — the model class Qwen belongs to
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
- Agentic codingAgentic coding is software development where an LLM-powered agent plans, edits, runs, and verifies code on its own using tools, not just autocomplete.
- AI pair programmingAI pair programming is a collaboration style where an LLM assistant sits alongside you, suggesting code and reviewing changes in real time as you work.
- ANSI escape codesANSI escape codes are control sequences that terminals interpret for colors, cursor movement, and screen clearing — the language of every modern CLI UI.
- Autonomous agentAn autonomous agent is an AI program that perceives, decides, and acts on its own toward a goal — the architecture behind modern coding CLIs.
- CheckpointA checkpoint is a saved snapshot of file state that lets you roll back an AI coding agent's changes to a known-good point.
- Claude CodeClaude Code is Anthropic's official command-line agent that plans, edits, runs, and verifies code across your repo using Claude models and tool use.