@jaydennleemc/qwen-code-local 0.12.7 → 0.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +39 -15
- package/dist/bundled/review/SKILL.md +10 -5
- package/dist/cli.js +203327 -182636
- package/dist/sandbox-macos-permissive-open.sb +3 -1
- package/dist/vendor/tree-sitter/tree-sitter-bash.wasm +0 -0
- package/dist/vendor/tree-sitter/tree-sitter.wasm +0 -0
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -33,21 +33,45 @@ Qwen Code is an open-source AI agent for the terminal, optimized for [Qwen3-Code
|
|
|
33
33
|
|
|
34
34
|
## Installation
|
|
35
35
|
|
|
36
|
-
###
|
|
36
|
+
### Quick Install (Recommended)
|
|
37
|
+
|
|
38
|
+
#### Linux / macOS
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
bash -c "$(curl -fsSL https://qwen-code-assets.oss-cn-hangzhou.aliyuncs.com/installation/install-qwen.sh)"
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
#### Windows (Run as Administrator CMD)
|
|
45
|
+
|
|
46
|
+
```cmd
|
|
47
|
+
curl -fsSL -o %TEMP%\install-qwen.bat https://qwen-code-assets.oss-cn-hangzhou.aliyuncs.com/installation/install-qwen.bat && %TEMP%\install-qwen.bat
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
> **Note**: It's recommended to restart your terminal after installation to ensure environment variables take effect.
|
|
51
|
+
|
|
52
|
+
### Manual Installation
|
|
53
|
+
|
|
54
|
+
#### Prerequisites
|
|
37
55
|
|
|
38
56
|
Make sure you have Node.js 20 or later installed. Download it from [nodejs.org](https://nodejs.org/en/download).
|
|
39
57
|
|
|
40
58
|
#### NPM
|
|
41
59
|
|
|
42
60
|
```bash
|
|
43
|
-
npm
|
|
61
|
+
npm install -g @qwen-code/qwen-code@latest
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
#### Homebrew (macOS, Linux)
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
brew install qwen-code
|
|
44
68
|
```
|
|
45
69
|
|
|
46
70
|
## Quick Start
|
|
47
71
|
|
|
48
72
|
```bash
|
|
49
73
|
# Start Qwen Code (interactive)
|
|
50
|
-
qwen
|
|
74
|
+
qwen
|
|
51
75
|
|
|
52
76
|
# Then, in the session:
|
|
53
77
|
/help
|
|
@@ -101,11 +125,11 @@ Use this if you want more flexibility over which provider and model to use. Supp
|
|
|
101
125
|
- **Anthropic**: Claude models
|
|
102
126
|
- **Google GenAI**: Gemini models
|
|
103
127
|
|
|
104
|
-
The **recommended** way to configure models and providers is by editing `~/.
|
|
128
|
+
The **recommended** way to configure models and providers is by editing `~/.qwen/settings.json` (create it if it doesn't exist). This file lets you define all available models, API keys, and default settings in one place.
|
|
105
129
|
|
|
106
130
|
##### Quick Setup in 3 Steps
|
|
107
131
|
|
|
108
|
-
**Step 1:** Create or edit `~/.
|
|
132
|
+
**Step 1:** Create or edit `~/.qwen/settings.json`
|
|
109
133
|
|
|
110
134
|
Here is a complete example:
|
|
111
135
|
|
|
@@ -151,7 +175,7 @@ Here is a complete example:
|
|
|
151
175
|
**Step 3:** Start Qwen Code — your configuration takes effect automatically:
|
|
152
176
|
|
|
153
177
|
```bash
|
|
154
|
-
qwen
|
|
178
|
+
qwen
|
|
155
179
|
```
|
|
156
180
|
|
|
157
181
|
Use the `/model` command at any time to switch between all configured models.
|
|
@@ -325,7 +349,7 @@ Use the `/model` command at any time to switch between all configured models.
|
|
|
325
349
|
|
|
326
350
|
> **Tip:** You can also set API keys via `export` in your shell or `.env` files, which take higher priority than `settings.json` → `env`. See the [authentication guide](https://qwenlm.github.io/qwen-code-docs/en/users/configuration/auth/) for full details.
|
|
327
351
|
|
|
328
|
-
> **Security note:** Never commit API keys to version control. The `~/.
|
|
352
|
+
> **Security note:** Never commit API keys to version control. The `~/.qwen/settings.json` file is in your home directory and should stay private.
|
|
329
353
|
|
|
330
354
|
## Usage
|
|
331
355
|
|
|
@@ -340,16 +364,16 @@ As an open-source terminal agent, you can use Qwen Code in four primary ways:
|
|
|
340
364
|
|
|
341
365
|
```bash
|
|
342
366
|
cd your-project/
|
|
343
|
-
qwen
|
|
367
|
+
qwen
|
|
344
368
|
```
|
|
345
369
|
|
|
346
|
-
Run `qwen
|
|
370
|
+
Run `qwen` in your project folder to launch the interactive terminal UI. Use `@` to reference local files (for example `@src/main.ts`).
|
|
347
371
|
|
|
348
372
|
#### Headless mode
|
|
349
373
|
|
|
350
374
|
```bash
|
|
351
375
|
cd your-project/
|
|
352
|
-
qwen
|
|
376
|
+
qwen -p "your question"
|
|
353
377
|
```
|
|
354
378
|
|
|
355
379
|
Use `-p` to run Qwen Code without the interactive UI—ideal for scripts, automation, and CI/CD. Learn more: [Headless mode](https://qwenlm.github.io/qwen-code-docs/en/users/features/headless).
|
|
@@ -393,10 +417,10 @@ Build on top of Qwen Code with the TypeScript SDK:
|
|
|
393
417
|
|
|
394
418
|
Qwen Code can be configured via `settings.json`, environment variables, and CLI flags.
|
|
395
419
|
|
|
396
|
-
| File
|
|
397
|
-
|
|
|
398
|
-
| `~/.
|
|
399
|
-
| `.qwen/settings.json`
|
|
420
|
+
| File | Scope | Description |
|
|
421
|
+
| ----------------------- | ------------- | --------------------------------------------------------------------------------------- |
|
|
422
|
+
| `~/.qwen/settings.json` | User (global) | Applies to all your Qwen Code sessions. **Recommended for `modelProviders` and `env`.** |
|
|
423
|
+
| `.qwen/settings.json` | Project | Applies only when running Qwen Code in this project. Overrides user settings. |
|
|
400
424
|
|
|
401
425
|
The most commonly used top-level fields in `settings.json`:
|
|
402
426
|
|
|
@@ -433,7 +457,7 @@ To report a bug from within the CLI, run `/bug` and include a short title and re
|
|
|
433
457
|
|
|
434
458
|
## Connect with Us
|
|
435
459
|
|
|
436
|
-
- Discord: https://discord.gg/
|
|
460
|
+
- Discord: https://discord.gg/RN7tqZCeDK
|
|
437
461
|
- Dingtalk: https://qr.dingtalk.com/action/joingroup?code=v1,k1,+FX6Gf/ZDlTahTIRi8AEQhIaBlqykA0j+eBKKdhLeAE=&_dt_no_comment=1&origin=1
|
|
438
462
|
|
|
439
463
|
## Acknowledgments
|
|
@@ -15,15 +15,16 @@ You are an expert code reviewer. Your job is to review code changes and provide
|
|
|
15
15
|
|
|
16
16
|
## Step 1: Determine what to review
|
|
17
17
|
|
|
18
|
-
Based on the arguments provided:
|
|
18
|
+
Your goal here is to understand the scope of changes so you can dispatch agents effectively in Step 2. Based on the arguments provided:
|
|
19
19
|
|
|
20
20
|
- **No arguments**: Review local uncommitted changes
|
|
21
21
|
- Run `git diff` and `git diff --staged` to get all changes
|
|
22
22
|
- If both diffs are empty, inform the user there are no changes to review and stop here — do not proceed to the review agents
|
|
23
23
|
|
|
24
24
|
- **PR number or URL** (e.g., `123` or `https://github.com/.../pull/123`):
|
|
25
|
-
-
|
|
26
|
-
- Run `gh pr
|
|
25
|
+
- Save the current branch name, stash any local changes (`git stash --include-untracked`), then `gh pr checkout <number>`
|
|
26
|
+
- Run `gh pr view <number>` and save the output (title, description, base branch, etc.) to a temp file (e.g., `/tmp/pr-review-context.md`) so agents can read it without you repeating it in each prompt
|
|
27
|
+
- Note the base branch (e.g., `main`) — agents will use `git diff <base>...HEAD` to get the diff and can read files directly
|
|
27
28
|
|
|
28
29
|
- **File path** (e.g., `src/foo.ts`):
|
|
29
30
|
- Run `git diff HEAD -- <file>` to get recent changes
|
|
@@ -33,6 +34,8 @@ Based on the arguments provided:
|
|
|
33
34
|
|
|
34
35
|
Launch **four parallel review agents** to analyze the changes from different angles. Each agent should focus exclusively on its dimension.
|
|
35
36
|
|
|
37
|
+
**IMPORTANT**: Do NOT paste the full diff into each agent's prompt — this duplicates it 4x. Instead, give each agent the command to obtain the diff, a concise summary of what the changes are about, and its review focus. Each agent can read files and search the codebase on its own.
|
|
38
|
+
|
|
36
39
|
### Agent 1: Correctness & Security
|
|
37
40
|
|
|
38
41
|
Focus areas:
|
|
@@ -77,9 +80,11 @@ Focus areas:
|
|
|
77
80
|
- Unexpected side effects or hidden coupling
|
|
78
81
|
- Anything else that looks off — trust your instincts
|
|
79
82
|
|
|
80
|
-
## Step 3:
|
|
83
|
+
## Step 3: Restore environment and present findings
|
|
84
|
+
|
|
85
|
+
If you checked out a PR branch in Step 1, restore the original state first: check out the original branch, `git stash pop` if changes were stashed, and remove the temp file.
|
|
81
86
|
|
|
82
|
-
|
|
87
|
+
Then combine results from all four agents into a single, well-organized review. Use this format:
|
|
83
88
|
|
|
84
89
|
### Summary
|
|
85
90
|
|