Skip to main content

What is Qwen Code?

Qwen Code is an open-source AI agent for the terminal that helps you understand large codebases, automate tedious work, and ship faster. Built and optimized for Qwen3-Coder, it brings powerful AI capabilities directly to your command line.

Quick Install

Get started in seconds with npm, Homebrew, or our install script

Quick Start

Launch your first AI-assisted coding session

Why Choose Qwen Code?

Qwen Code stands out from other AI coding assistants with these key advantages:

Multi-Protocol with Free Tier

Use OpenAI, Anthropic, or Gemini-compatible APIs—or sign in with Qwen OAuth for 1,000 free requests per day. No credit card required.

Open-Source & Co-Evolving

Both the framework and the Qwen3-Coder model are open-source. They’re developed together, ensuring seamless integration and continuous improvement.

Agentic & Feature-Rich

Rich built-in tools including Skills, SubAgents, and Plan Mode provide a full agentic workflow for complex coding tasks.

Terminal-First, IDE-Friendly

Built for developers who live in the command line, with optional integration for VS Code, Zed, and JetBrains IDEs.

How It Works

Qwen Code operates in multiple modes to fit your workflow:

Interactive Mode

Launch an intuitive terminal UI where you can chat with AI, reference files, and see changes in real-time:
cd your-project/
qwen
Use @ to reference local files:
Explain what @src/main.ts does
Refactor @utils/helpers.js to use modern ES6 syntax

Headless Mode

Run AI commands without the interactive UI—perfect for scripts, automation, and CI/CD:
qwen -p "Generate unit tests for src/api/users.ts"
qwen -p "Review the code in @src/auth.ts for security issues"

IDE Integration

Use Qwen Code inside your favorite editor:
  • VS Code: Full extension with inline assistance
  • Zed: Native integration for AI-powered editing
  • JetBrains: Plugin support for IntelliJ, PyCharm, and more
Learn more in the IDE Integration section.

Key Features

Intelligent Code Understanding

  • Codebase Analysis: Ask questions about your entire project structure
  • File References: Use @filename to include specific files in context
  • Multi-File Refactoring: Make changes across multiple files safely

Powerful Tools & Agents

  • SubAgents: Delegate complex tasks to specialized AI agents
  • Skills System: Reusable skill modules for common workflows
  • MCP Support: Connect to Model Context Protocol servers
  • LSP Integration: Leverage Language Server Protocol for code intelligence

Flexible Authentication

Choose the authentication method that works best for you:

Qwen OAuth

Recommended: Sign in with your qwen.ai account. Get 1,000 free requests daily.

API Key

Use your own API keys from OpenAI, Anthropic, Google GenAI, or Alibaba Cloud.

Advanced Capabilities

  • Sandbox Execution: Run commands safely in isolated Docker/Podman containers
  • Token Caching: Reduce costs with intelligent prompt caching
  • Memory System: Maintain context across sessions
  • Approval Modes: Control AI actions with --yolo or step-by-step approval

Use Cases

Qwen Code excels at a wide range of development tasks:
  • “What does this codebase do?”
  • “Explain the architecture of this project”
  • “Find all the places where user authentication is handled”
  • “How does the payment flow work?”
  • “Generate unit tests for this module”
  • “Create a REST API endpoint for user management”
  • “Add error handling to this function”
  • “Implement a caching layer for database queries”
  • “Refactor this function to be more readable”
  • “Convert this code from JavaScript to TypeScript”
  • “Optimize this database query for performance”
  • “Split this large component into smaller, reusable pieces”
  • “Why is this test failing?”
  • “Find and fix the memory leak in this code”
  • “Debug the race condition in this async function”
  • “Identify security vulnerabilities in this authentication flow”
  • “Add JSDoc comments to all exported functions”
  • “Review this PR for code quality issues”
  • “Generate a README for this project”
  • “Create API documentation from these endpoints”

Technology Stack

Qwen Code is built with modern, production-ready technologies:
  • Runtime: Node.js 20+
  • Language: TypeScript 5.3+ with strict mode
  • UI Framework: Ink (React for CLI)
  • Build Tool: esbuild for fast compilation
  • Testing: Vitest with comprehensive test coverage

Project Background

Qwen Code is based on Google Gemini CLI, with significant adaptations to better support Qwen-Coder models. The project is actively maintained by the Qwen team and welcomes community contributions.

GitHub Repository

Star the repo and contribute to the project

Join Discord

Get help and connect with the community

Performance

Qwen Code delivers strong performance on terminal-based coding benchmarks:
AgentModelTerminal-Bench Accuracy
Qwen CodeQwen3-Coder-480A3537.5%
Qwen CodeQwen3-Coder-30BA3B31.3%
Terminal-Bench measures an AI agent’s ability to complete real-world terminal-based coding tasks.

Next Steps

Ready to get started? Follow these guides:
1

Install Qwen Code

Choose your preferred installation method: npm, Homebrew, or install script.Go to Installation →
2

Set Up Authentication

Configure Qwen OAuth for free tier access or connect your API keys.Go to Authentication →
3

Run Your First Session

Launch Qwen Code and complete your first AI-assisted coding task.Go to Quick Start →
Node.js 20 or later is required. Make sure you have the correct version installed before proceeding.