mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-20 08:47:44 +00:00
docs: updated overview & quickstart, uploaded gif
This commit is contained in:
@@ -43,7 +43,7 @@ what are the key data models?
|
|||||||
how is authentication handled?
|
how is authentication handled?
|
||||||
```
|
```
|
||||||
|
|
||||||
> [!tip] Tips:
|
>[!tip] Tips:
|
||||||
>
|
>
|
||||||
> - Start with broad questions, then narrow down to specific areas
|
> - Start with broad questions, then narrow down to specific areas
|
||||||
> - Ask about coding conventions and patterns used in the project
|
> - Ask about coding conventions and patterns used in the project
|
||||||
@@ -95,7 +95,7 @@ suggest a few ways to fix the @ts-ignore in user.ts
|
|||||||
update user.tsto add the null check you suggested
|
update user.tsto add the null check you suggested
|
||||||
```
|
```
|
||||||
|
|
||||||
> [!tip] Tips:
|
> [!tip]
|
||||||
>
|
>
|
||||||
> - Tell Qwen Code the command to reproduce the issue and get a stack trace
|
> - Tell Qwen Code the command to reproduce the issue and get a stack trace
|
||||||
> - Mention any steps to reproduce the error
|
> - Mention any steps to reproduce the error
|
||||||
@@ -129,7 +129,7 @@ refactor utils.js to use ES 2024 features while maintaining the same behavior
|
|||||||
run tests for the refactored code
|
run tests for the refactored code
|
||||||
```
|
```
|
||||||
|
|
||||||
> [!tip] Tips:
|
> [!tip]
|
||||||
>
|
>
|
||||||
> - Ask Qwen Code to explain the benefits of the modern approach
|
> - Ask Qwen Code to explain the benefits of the modern approach
|
||||||
> - Request that changes maintain backward compatibility when needed
|
> - Request that changes maintain backward compatibility when needed
|
||||||
@@ -182,7 +182,7 @@ Then select "Create New subagent" and follow the prompts to define:
|
|||||||
- Which tools it can access
|
- Which tools it can access
|
||||||
- A system prompt describing the agent's role and behavior
|
- A system prompt describing the agent's role and behavior
|
||||||
|
|
||||||
> [!tip] Tips:
|
> [!tip]
|
||||||
>
|
>
|
||||||
> - Create project-specific subagents in `.qwen/agents/` for team sharing
|
> - Create project-specific subagents in `.qwen/agents/` for team sharing
|
||||||
> - Use descriptive `description` fields to enable automatic delegation
|
> - Use descriptive `description` fields to enable automatic delegation
|
||||||
@@ -305,7 +305,7 @@ enhance the PR description with more context about the security improvements
|
|||||||
add information about how these changes were tested
|
add information about how these changes were tested
|
||||||
```
|
```
|
||||||
|
|
||||||
> [!tip] Tips:
|
> [!tip]
|
||||||
>
|
>
|
||||||
> - Ask Qwen Code directly to make a PR for you
|
> - Ask Qwen Code directly to make a PR for you
|
||||||
> - Review Qwen Code's generated PR before submitting
|
> - Review Qwen Code's generated PR before submitting
|
||||||
@@ -335,7 +335,7 @@ improve the generated documentation with more context and examples
|
|||||||
check if the documentation follows our project standards
|
check if the documentation follows our project standards
|
||||||
```
|
```
|
||||||
|
|
||||||
> [!tip] Tips:
|
> [!tip]
|
||||||
>
|
>
|
||||||
> - Specify the documentation style you want (JSDoc, docstrings, etc.)
|
> - Specify the documentation style you want (JSDoc, docstrings, etc.)
|
||||||
> - Ask for examples in the documentation
|
> - Ask for examples in the documentation
|
||||||
@@ -384,7 +384,7 @@ Generate CSS to match this design mockup
|
|||||||
What HTML structure would recreate this component?
|
What HTML structure would recreate this component?
|
||||||
```
|
```
|
||||||
|
|
||||||
> [!tip] Tips:
|
> [!tip]
|
||||||
>
|
>
|
||||||
> - Use images when text descriptions would be unclear or cumbersome
|
> - Use images when text descriptions would be unclear or cumbersome
|
||||||
> - Include screenshots of errors, UI designs, or diagrams for better context
|
> - Include screenshots of errors, UI designs, or diagrams for better context
|
||||||
@@ -416,7 +416,7 @@ Show me the data from @github: repos/owner/repo/issues
|
|||||||
|
|
||||||
This fetches data from connected MCP servers using the format @server: resource. See [MCP](/mcp) for details.
|
This fetches data from connected MCP servers using the format @server: resource. See [MCP](/mcp) for details.
|
||||||
|
|
||||||
> [!tip] Tips:
|
> [!tip]
|
||||||
>
|
>
|
||||||
> - File paths can be relative or absolute
|
> - File paths can be relative or absolute
|
||||||
> - @ file references add `QWEN.md` in the file's directory and parent directories to context
|
> - @ file references add `QWEN.md` in the file's directory and parent directories to context
|
||||||
@@ -486,7 +486,7 @@ This displays an interactive conversation selector with a clean list view showin
|
|||||||
|
|
||||||
Use arrow keys to navigate and press Enter to select a conversation. Press Esc to exit.
|
Use arrow keys to navigate and press Enter to select a conversation. Press Esc to exit.
|
||||||
|
|
||||||
> [!tip] Tips:
|
> [!tip]
|
||||||
>
|
>
|
||||||
> - Conversation history is stored locally on your machine
|
> - Conversation history is stored locally on your machine
|
||||||
> - Use `--continue` for quick access to your most recent conversation
|
> - Use `--continue` for quick access to your most recent conversation
|
||||||
@@ -564,7 +564,7 @@ git worktree remove ../project-feature-a
|
|||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
> [!tip] Tips:
|
> [!tip]
|
||||||
>
|
>
|
||||||
> - Each worktree has its own independent file state, making it perfect for parallel Qwen Code sessions
|
> - Each worktree has its own independent file state, making it perfect for parallel Qwen Code sessions
|
||||||
> - Changes made in one worktree won't affect others, preventing Qwen Code instances from interfering with each other
|
> - Changes made in one worktree won't affect others, preventing Qwen Code instances from interfering with each other
|
||||||
@@ -597,7 +597,7 @@ Suppose you want to use Qwen Code as a linter or code reviewer.
|
|||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
> [!tip] Tips:
|
> [!tip]
|
||||||
>
|
>
|
||||||
> - Use Qwen Code for automated code review in your CI/CD pipeline
|
> - Use Qwen Code for automated code review in your CI/CD pipeline
|
||||||
> - Customize the prompt to check for specific issues relevant to your project
|
> - Customize the prompt to check for specific issues relevant to your project
|
||||||
@@ -613,7 +613,7 @@ Suppose you want to pipe data into Qwen Code, and get back data in a structured
|
|||||||
cat build-error.txt | qwen-code -p 'concisely explain the root cause of this build error' > output.txt
|
cat build-error.txt | qwen-code -p 'concisely explain the root cause of this build error' > output.txt
|
||||||
```
|
```
|
||||||
|
|
||||||
> [!tip] Tips:
|
> [!tip]
|
||||||
>
|
>
|
||||||
> - Use pipes to integrate Qwen-Code into existing shell scripts
|
> - Use pipes to integrate Qwen-Code into existing shell scripts
|
||||||
> - Combine with other Unix tools for powerful workflows
|
> - Combine with other Unix tools for powerful workflows
|
||||||
@@ -647,7 +647,7 @@ cat log. txt | qwen-code -p 'parse this log file for errors' --output-format str
|
|||||||
|
|
||||||
This outputs a series of JSON objects in real-time as Qwen Code processes the request. Each message is a valid JSON object, but the entire output is not valid JSON if concatenated.
|
This outputs a series of JSON objects in real-time as Qwen Code processes the request. Each message is a valid JSON object, but the entire output is not valid JSON if concatenated.
|
||||||
|
|
||||||
> [!tip] Tips:
|
> [!tip]
|
||||||
>
|
>
|
||||||
> - Use `--output-format text` for simple integrations where you just need Qwen Code's response
|
> - Use `--output-format text` for simple integrations where you just need Qwen Code's response
|
||||||
> - Use `--output-format json` when you need the full conversation log
|
> - Use `--output-format json` when you need the full conversation log
|
||||||
@@ -688,7 +688,7 @@ what are the limitations of Qwen Code?
|
|||||||
>
|
>
|
||||||
> Qwen Code provides documentation-based answers to these questions. For executable examples and hands-on demonstrations, refer to the specific workflow sections above.
|
> Qwen Code provides documentation-based answers to these questions. For executable examples and hands-on demonstrations, refer to the specific workflow sections above.
|
||||||
|
|
||||||
> [!tip] Tips:
|
> [!tip]
|
||||||
>
|
>
|
||||||
> - Qwen Code always has access to the latest Qwen Code documentation, regardless of the version you're using
|
> - Qwen Code always has access to the latest Qwen Code documentation, regardless of the version you're using
|
||||||
> - Ask specific questions to get detailed answers
|
> - Ask specific questions to get detailed answers
|
||||||
|
|||||||
@@ -7,15 +7,11 @@
|
|||||||
Prerequisites:
|
Prerequisites:
|
||||||
|
|
||||||
- A [Qwen Code](https://chat.qwen.ai/auth?mode=register) account
|
- A [Qwen Code](https://chat.qwen.ai/auth?mode=register) account
|
||||||
- Requires [Node.js 20+](https://nodejs.org/download), you can use `node -v` to check the version. If it's not installed, use the following command to install it.
|
- Requires [Node.js 20+](https://nodejs.org/zh-cn/download), you can use `node -v` to check the version. If it's not installed, use the following command to install it.
|
||||||
|
|
||||||
```bash
|
|
||||||
curl -qL https://www.npmjs.com/install.sh | sh
|
|
||||||
```
|
|
||||||
|
|
||||||
### Install Qwen Code:
|
### Install Qwen Code:
|
||||||
|
|
||||||
**NPM**(recommended)
|
⭐️ **NPM**(recommended)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
npm install -g @qwen-code/qwen-code@latest
|
npm install -g @qwen-code/qwen-code@latest
|
||||||
@@ -27,6 +23,8 @@ npm install -g @qwen-code/qwen-code@latest
|
|||||||
brew install qwen-code
|
brew install qwen-code
|
||||||
```
|
```
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
### Start using Qwen Code:
|
### Start using Qwen Code:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
@@ -34,7 +32,15 @@ cd your-project
|
|||||||
qwen
|
qwen
|
||||||
```
|
```
|
||||||
|
|
||||||
You'll be prompted to log in on first use. That's it! [Continue with Quickstart (5 mins) →](/quickstart)
|
Let's start with understanding your codebase. Try one of these commands:
|
||||||
|
|
||||||
|
```
|
||||||
|
what does this project do?
|
||||||
|
```
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
You'll be prompted to log in on first use. That's it! [Continue with Quickstart (5 mins) →](/users/quickstart)
|
||||||
|
|
||||||
> [!tip]
|
> [!tip]
|
||||||
>
|
>
|
||||||
@@ -48,11 +54,11 @@ You'll be prompted to log in on first use. That's it! [Continue with Quickstart
|
|||||||
|
|
||||||
* **Build features from descriptions**: Tell Qwen Code what you want to build in plain language. It will make a plan, write the code, and ensure it works.
|
* **Build features from descriptions**: Tell Qwen Code what you want to build in plain language. It will make a plan, write the code, and ensure it works.
|
||||||
* **Debug and fix issues**: Describe a bug or paste an error message. Qwen Code will analyze your codebase, identify the problem, and implement a fix.
|
* **Debug and fix issues**: Describe a bug or paste an error message. Qwen Code will analyze your codebase, identify the problem, and implement a fix.
|
||||||
* **Navigate any codebase**: Ask anything about your team's codebase, and get a thoughtful answer back. Qwen Code maintains awareness of your entire project structure, can find up-to-date information from the web, and with [MCP](/mcp) can pull from external datasources like Google Drive, Figma, and Slack.
|
* **Navigate any codebase**: Ask anything about your team's codebase, and get a thoughtful answer back. Qwen Code maintains awareness of your entire project structure, can find up-to-date information from the web, and with [MCP](/users/features/mcp) can pull from external datasources like Google Drive, Figma, and Slack.
|
||||||
* **Automate tedious tasks**: Fix fiddly lint issues, resolve merge conflicts, and write release notes. Do all this in a single command from your developer machines, or automatically in CI.
|
* **Automate tedious tasks**: Fix fiddly lint issues, resolve merge conflicts, and write release notes. Do all this in a single command from your developer machines, or automatically in CI.
|
||||||
|
|
||||||
## Why developers love Qwen Code
|
## Why developers love Qwen Code
|
||||||
|
|
||||||
* **Works in your terminal**: Not another chat window. Not another IDE. Qwen Code meets you where you already work, with the tools you already love.
|
* **Works in your terminal**: Not another chat window. Not another IDE. Qwen Code meets you where you already work, with the tools you already love.
|
||||||
* **Takes action**: Qwen Code can directly edit files, run commands, and create commits. Need more? [MCP](/mcp) lets Qwen Code read your design docs in Google Drive, update your tickets in Jira, or use *your* custom developer tooling.
|
* **Takes action**: Qwen Code can directly edit files, run commands, and create commits. Need more? [MCP](/users/features/mcp) lets Qwen Code read your design docs in Google Drive, update your tickets in Jira, or use *your* custom developer tooling.
|
||||||
* **Unix philosophy**: Qwen Code is composable and scriptable. `tail -f app.log | qwen -p "Slack me if you see any anomalies appear in this log stream"` *works*. Your CI can run `qwen -p "If there are new text strings, translate them into French and raise a PR for @lang-fr-team to review"`.
|
* **Unix philosophy**: Qwen Code is composable and scriptable. `tail -f app.log | qwen -p "Slack me if you see any anomalies appear in this log stream"` *works*. Your CI can run `qwen -p "If there are new text strings, translate them into French and raise a PR for @lang-fr-team to review"`.
|
||||||
@@ -20,10 +20,6 @@ To install Qwen Code, use one of the following methods:
|
|||||||
|
|
||||||
Requires [Node.js 20+](https://nodejs.org/download), you can use `node -v` check the version. If it's not installed, use the following command to install it.
|
Requires [Node.js 20+](https://nodejs.org/download), you can use `node -v` check the version. If it's not installed, use the following command to install it.
|
||||||
|
|
||||||
```bash
|
|
||||||
curl -qL https://www.npmjs.com/install.sh | sh
|
|
||||||
```
|
|
||||||
|
|
||||||
If you have [Node.js or newer installed](https://nodejs.org/en/download/):
|
If you have [Node.js or newer installed](https://nodejs.org/en/download/):
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
@@ -71,30 +67,14 @@ cd /path/to/your/project
|
|||||||
qwen
|
qwen
|
||||||
```
|
```
|
||||||
|
|
||||||
You'll see the Qwen Code welcome screen with your session information, recent conversations, and latest updates. Type `/help` for available commands or `/resume` to continue a previous conversation.
|
You'll see the Qwen Code welcome screen with your session information, recent conversations, and latest updates. Type `/help` for available commands.
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
## Chat with Qwen Code
|
## Chat with Qwen Code
|
||||||
|
|
||||||
### Ask your first question
|
### Ask your first question
|
||||||
|
|
||||||
Let's start with understanding your codebase. Try one of these commands:
|
|
||||||
|
|
||||||
```
|
|
||||||
what does this project do?
|
|
||||||
```
|
|
||||||
|
|
||||||
Qwen Code will analyze your files and provide a summary. You can also ask more specific questions:
|
Qwen Code will analyze your files and provide a summary. You can also ask more specific questions:
|
||||||
|
|
||||||
```
|
|
||||||
what technologies does this project use?
|
|
||||||
```
|
|
||||||
|
|
||||||
```
|
|
||||||
where is the main entry point?
|
|
||||||
```
|
|
||||||
|
|
||||||
```
|
```
|
||||||
explain the folder structure
|
explain the folder structure
|
||||||
```
|
```
|
||||||
@@ -105,14 +85,6 @@ You can also ask Qwen Code about its own capabilities:
|
|||||||
what can Qwen Code do?
|
what can Qwen Code do?
|
||||||
```
|
```
|
||||||
|
|
||||||
```
|
|
||||||
how do I use slash commands in Qwen Code?
|
|
||||||
```
|
|
||||||
|
|
||||||
```
|
|
||||||
can Qwen Code work with Docker?
|
|
||||||
```
|
|
||||||
|
|
||||||
> [!note]
|
> [!note]
|
||||||
> Qwen Code reads your files as needed - you don't have to manually add context. Qwen Code also has access to its own documentation and can answer questions about its features and capabilities.
|
> Qwen Code reads your files as needed - you don't have to manually add context. Qwen Code also has access to its own documentation and can answer questions about its features and capabilities.
|
||||||
|
|
||||||
@@ -218,27 +190,21 @@ review my changes and suggest improvements
|
|||||||
|
|
||||||
Here are the most important commands for daily use:
|
Here are the most important commands for daily use:
|
||||||
|
|
||||||
| Command | What it does | Example |
|
| Command | What it does | Example |
|
||||||
| --------------------- | ------------------------------------------------------ | ---------------------------------- |
|
| --------------------- | ------------------------------------------------------ | ----------------------------- |
|
||||||
| `qwen` | start Qwen Code | `qwen` |
|
| `qwen` | start Qwen Code | `qwen` |
|
||||||
| `/chat` | Manually save and restore conversation history | Requires sub-commands |
|
| `/summary` | Generate project summary based on conversation history | `/summary` |
|
||||||
| → `save <label>` | Save current conversation state | `/chat save Feature Ideation` |
|
| `/compress` | Replace chat history with summary to save Tokens | `/compress` |
|
||||||
| → `resume <label>` | Restore conversation from saved point | `/chat resume Feature Ideation` |
|
| `/clear` | Clear terminal screen content | `/clear` (shortcut: `Ctrl+L`) |
|
||||||
| → `list` | List all recoverable conversation labels | `/chat list` |
|
| `/theme` | Change Qwen Code visual theme | `/theme` |
|
||||||
| → `delete <label>` | Delete saved conversation checkpoint | `/chat delete Feature Ideation` |
|
| `/language` | View or change language settings | `/language` |
|
||||||
| → `share [file]` | Export conversation as Markdown or JSON | `/chat share Discussion Record.md` |
|
| → `ui [language]` | Set UI interface language | `/language ui zh-CN` |
|
||||||
| `/summary` | Generate project summary based on conversation history | `/summary` |
|
| → `output [language]` | Set LLM output language | `/language output Chinese` |
|
||||||
| `/compress` | Replace chat history with summary to save Tokens | `/compress` |
|
| `/help` | Display help information for available commands | `/help` or `/?` |
|
||||||
| `/clear` | Clear terminal screen content | `/clear` (shortcut: `Ctrl+L`) |
|
| `/auth` | Change authentication method | `/auth` |
|
||||||
| `/theme` | Change Qwen Code visual theme | `/theme` |
|
| `/quit` | Exit Qwen Code immediately | `/quit` or `/exit` |
|
||||||
| `/language` | View or change language settings | `/language` |
|
|
||||||
| → `ui [language]` | Set UI interface language | `/language ui zh-CN` |
|
|
||||||
| → `output [language]` | Set LLM output language | `/language output Chinese` |
|
|
||||||
| `/help` | Display help information for available commands | `/help` or `/?` |
|
|
||||||
| `/auth` | Change authentication method | `/auth` |
|
|
||||||
| `/quit` | Exit Qwen Code immediately | `/quit` or `/exit` |
|
|
||||||
|
|
||||||
See the [CLI reference](/cli-reference) for a complete list of commands.
|
See the [CLI reference](/users/reference/cli-reference) for a complete list of commands.
|
||||||
|
|
||||||
## Pro tips for beginners
|
## Pro tips for beginners
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user