Overview
Qwen Code is an open-source AI agent designed to live in your terminal and assist developers with code understanding, refactoring, test generation, automation, and other coding workflows. It's optimized to work with Qwen3-Coder models but is OpenAI-compatible, allowing use with any OpenAI-compatible API endpoint or via Qwen OAuth for a free-tier experience.
Key features
- Terminal-first interactive agent: run
qwenin a project folder to start an interactive session that can reference local files and respond to developer prompts. - Headless mode for automation and CI: run
qwen -p "your question"to use the agent programmatically in scripts and pipelines. - Rich agent capabilities: built-in Skills, SubAgents, and a Plan Mode enable multi-step agentic workflows similar to high-productivity code assistants.
- Authentication flexibility: supports Qwen OAuth (recommended, free requests/day) and OpenAI-compatible API keys (env vars supported for CI).
- IDE integrations: official integrations for VS Code and Zed to bring the same agent features into editors.
- TypeScript SDK: programmatic SDK for building custom tooling on top of Qwen Code.
- Configurability: user and project settings (.qwen/settings.json and ~/.qwen/settings.json) plus CLI flags for fine-grained behavior control.
Usage and workflows
Installation is straightforward via npm or Homebrew:
npm install -g @qwen-code/qwen-code@latest
# or
brew install qwen-codeBasic interactive flow:
cd your-project/
qwen
# in session: /help, /auth, ask natural language questions about codeHeadless example (for scripts / CI):
qwen -p "Generate unit tests for src/foo.js"Authentication options include a browser-based Qwen OAuth flow (recommended) and environment variables for API-key-based usage (OPENAI_API_KEY, OPENAI_BASE_URL, OPENAI_MODEL).
Extensibility & ecosystem
Qwen Code aims to be both an end-user tool and a platform for building developer automation. The TypeScript SDK and modular package layout let developers extend functionality, author custom Skills/SubAgents, or integrate with other tooling. There are community and partner projects (for example desktop UIs and integrations) that build on Qwen Code.
Benchmarks & positioning
The project includes benchmark results for supported models (example: Terminal-Bench with Qwen3-Coder variants) to illustrate expected accuracy on coding tasks. Its design emphasizes an open, co-evolving stack (agent framework plus coder models) in contrast to closed proprietary SaaS agents.
Troubleshooting & support
Common troubleshooting steps are documented in the official docs (troubleshooting guide). From inside the CLI you can run /bug to submit a bug report with repro steps. Settings are persisted locally to allow reproducible behavior across sessions.
Who should use it
Qwen Code is targeted at developers who prefer terminal workflows, teams wanting programmable agent automation in CI, and contributors who want an open-source, extensible code-focused agent. It is suitable for exploring and automating large codebases, generating tests, refactoring, and integrating agentic automation into development pipelines.
