← 返回命令列表

Linux command

qwen-code 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Start an interactive session

qwen

Run in headless mode with a prompt

qwen -p "[explain this codebase]"

Reference a local file in your query

qwen``` then ```@[src/main.ts] [explain this file]

Configure authentication

qwen``` then ```/auth

Show session statistics

qwen``` then ```/stats

Compress conversation history to save tokens

qwen``` then ```/compress

说明

Qwen Code is an open-source AI coding agent for the terminal from Alibaba, optimized for the Qwen3-Coder model. It helps developers understand large codebases, automate tedious work, and ship faster with agentic coding capabilities. Built in TypeScript and forked from Gemini CLI, it offers a similar experience but is open to any model supporting the OpenAI completions API. Features include Skills, SubAgents, and Plan Mode for full agentic workflows. The tool supports deep code understanding beyond normal context windows and workflow automation for PR handling, rebases, and formatting. Authentication options include Qwen OAuth (2,000 free requests/day) or OpenAI-compatible APIs. IDE integrations are available for VS Code, Zed, and JetBrains.

参数

-p _PROMPT_
Run in headless mode with the provided prompt

FAQ

What is the qwen-code command used for?

Qwen Code is an open-source AI coding agent for the terminal from Alibaba, optimized for the Qwen3-Coder model. It helps developers understand large codebases, automate tedious work, and ship faster with agentic coding capabilities. Built in TypeScript and forked from Gemini CLI, it offers a similar experience but is open to any model supporting the OpenAI completions API. Features include Skills, SubAgents, and Plan Mode for full agentic workflows. The tool supports deep code understanding beyond normal context windows and workflow automation for PR handling, rebases, and formatting. Authentication options include Qwen OAuth (2,000 free requests/day) or OpenAI-compatible APIs. IDE integrations are available for VS Code, Zed, and JetBrains.

How do I run a basic qwen-code example?

Run `qwen` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -p _PROMPT_ do in qwen-code?

Run in headless mode with the provided prompt