@mmmbuto/qwen-code-termux 0.12.0-termux → 0.14.0-termux

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.
Files changed (67) hide show
  1. package/README.md +188 -55
  2. package/bundled/loop/SKILL.md +61 -0
  3. package/bundled/qc-helper/SKILL.md +151 -0
  4. package/bundled/qc-helper/docs/_meta.ts +30 -0
  5. package/bundled/qc-helper/docs/common-workflow.md +571 -0
  6. package/bundled/qc-helper/docs/configuration/_meta.ts +10 -0
  7. package/bundled/qc-helper/docs/configuration/auth.md +366 -0
  8. package/bundled/qc-helper/docs/configuration/memory.md +0 -0
  9. package/bundled/qc-helper/docs/configuration/model-providers.md +542 -0
  10. package/bundled/qc-helper/docs/configuration/qwen-ignore.md +55 -0
  11. package/bundled/qc-helper/docs/configuration/settings.md +655 -0
  12. package/bundled/qc-helper/docs/configuration/themes.md +160 -0
  13. package/bundled/qc-helper/docs/configuration/trusted-folders.md +61 -0
  14. package/bundled/qc-helper/docs/configuration.md +73 -0
  15. package/bundled/qc-helper/docs/extension/_meta.ts +9 -0
  16. package/bundled/qc-helper/docs/extension/extension-releasing.md +204 -0
  17. package/bundled/qc-helper/docs/extension/getting-started-extensions.md +299 -0
  18. package/bundled/qc-helper/docs/extension/introduction.md +338 -0
  19. package/bundled/qc-helper/docs/features/_meta.ts +19 -0
  20. package/bundled/qc-helper/docs/features/approval-mode.md +263 -0
  21. package/bundled/qc-helper/docs/features/arena.md +218 -0
  22. package/bundled/qc-helper/docs/features/channels/_meta.ts +7 -0
  23. package/bundled/qc-helper/docs/features/channels/dingtalk.md +134 -0
  24. package/bundled/qc-helper/docs/features/channels/overview.md +336 -0
  25. package/bundled/qc-helper/docs/features/channels/plugins.md +87 -0
  26. package/bundled/qc-helper/docs/features/channels/telegram.md +120 -0
  27. package/bundled/qc-helper/docs/features/channels/weixin.md +106 -0
  28. package/bundled/qc-helper/docs/features/checkpointing.md +77 -0
  29. package/bundled/qc-helper/docs/features/commands.md +312 -0
  30. package/bundled/qc-helper/docs/features/headless.md +318 -0
  31. package/bundled/qc-helper/docs/features/hooks.md +720 -0
  32. package/bundled/qc-helper/docs/features/language.md +139 -0
  33. package/bundled/qc-helper/docs/features/lsp.md +417 -0
  34. package/bundled/qc-helper/docs/features/mcp.md +281 -0
  35. package/bundled/qc-helper/docs/features/sandbox.md +241 -0
  36. package/bundled/qc-helper/docs/features/scheduled-tasks.md +139 -0
  37. package/bundled/qc-helper/docs/features/skills.md +289 -0
  38. package/bundled/qc-helper/docs/features/sub-agents.md +515 -0
  39. package/bundled/qc-helper/docs/features/token-caching.md +29 -0
  40. package/bundled/qc-helper/docs/ide-integration/_meta.ts +4 -0
  41. package/bundled/qc-helper/docs/ide-integration/ide-companion-spec.md +182 -0
  42. package/bundled/qc-helper/docs/ide-integration/ide-integration.md +144 -0
  43. package/bundled/qc-helper/docs/integration-github-action.md +241 -0
  44. package/bundled/qc-helper/docs/integration-jetbrains.md +81 -0
  45. package/bundled/qc-helper/docs/integration-vscode.md +39 -0
  46. package/bundled/qc-helper/docs/integration-zed.md +72 -0
  47. package/bundled/qc-helper/docs/overview.md +64 -0
  48. package/bundled/qc-helper/docs/quickstart.md +273 -0
  49. package/bundled/qc-helper/docs/reference/_meta.ts +3 -0
  50. package/bundled/qc-helper/docs/reference/keyboard-shortcuts.md +72 -0
  51. package/bundled/qc-helper/docs/support/Uninstall.md +42 -0
  52. package/bundled/qc-helper/docs/support/_meta.ts +6 -0
  53. package/bundled/qc-helper/docs/support/tos-privacy.md +112 -0
  54. package/bundled/qc-helper/docs/support/troubleshooting.md +123 -0
  55. package/bundled/review/SKILL.md +261 -0
  56. package/cli.js +298314 -244746
  57. package/locales/de.js +358 -7
  58. package/locales/en.js +347 -7
  59. package/locales/ja.js +347 -7
  60. package/locales/pt.js +353 -7
  61. package/locales/ru.js +348 -7
  62. package/locales/zh.js +333 -7
  63. package/package.json +12 -7
  64. package/sandbox-macos-permissive-open.sb +3 -1
  65. package/vendor/tree-sitter/tree-sitter-bash.wasm +0 -0
  66. package/vendor/tree-sitter/tree-sitter.wasm +0 -0
  67. package/CHANGELOG.md +0 -77
@@ -0,0 +1,160 @@
1
+ # Themes
2
+
3
+ Qwen Code supports a variety of themes to customize its color scheme and appearance. You can change the theme to suit your preferences via the `/theme` command or `"theme":` configuration setting.
4
+
5
+ ## Available Themes
6
+
7
+ Qwen Code comes with a selection of pre-defined themes, which you can list using the `/theme` command within the CLI:
8
+
9
+ - **Dark Themes:**
10
+ - `ANSI`
11
+ - `Atom One`
12
+ - `Ayu`
13
+ - `Default`
14
+ - `Dracula`
15
+ - `GitHub`
16
+ - **Light Themes:**
17
+ - `ANSI Light`
18
+ - `Ayu Light`
19
+ - `Default Light`
20
+ - `GitHub Light`
21
+ - `Google Code`
22
+ - `Xcode`
23
+
24
+ ### Changing Themes
25
+
26
+ 1. Enter `/theme` into Qwen Code.
27
+ 2. A dialog or selection prompt appears, listing the available themes.
28
+ 3. Using the arrow keys, select a theme. Some interfaces might offer a live preview or highlight as you select.
29
+ 4. Confirm your selection to apply the theme.
30
+
31
+ **Note:** If a theme is defined in your `settings.json` file (either by name or by a file path), you must remove the `"theme"` setting from the file before you can change the theme using the `/theme` command.
32
+
33
+ ### Theme Persistence
34
+
35
+ Selected themes are saved in Qwen Code's [configuration](../configuration/settings) so your preference is remembered across sessions.
36
+
37
+ ---
38
+
39
+ ## Custom Color Themes
40
+
41
+ Qwen Code allows you to create your own custom color themes by specifying them in your `settings.json` file. This gives you full control over the color palette used in the CLI.
42
+
43
+ ### How to Define a Custom Theme
44
+
45
+ Add a `customThemes` block to your user, project, or system `settings.json` file. Each custom theme is defined as an object with a unique name and a set of color keys. For example:
46
+
47
+ ```json
48
+ {
49
+ "ui": {
50
+ "customThemes": {
51
+ "MyCustomTheme": {
52
+ "name": "MyCustomTheme",
53
+ "type": "custom",
54
+ "Background": "#181818",
55
+ ...
56
+ }
57
+ }
58
+ }
59
+ }
60
+ ```
61
+
62
+ **Color keys:**
63
+
64
+ - `Background`
65
+ - `Foreground`
66
+ - `LightBlue`
67
+ - `AccentBlue`
68
+ - `AccentPurple`
69
+ - `AccentCyan`
70
+ - `AccentGreen`
71
+ - `AccentYellow`
72
+ - `AccentRed`
73
+ - `Comment`
74
+ - `Gray`
75
+ - `DiffAdded` (optional, for added lines in diffs)
76
+ - `DiffRemoved` (optional, for removed lines in diffs)
77
+ - `DiffModified` (optional, for modified lines in diffs)
78
+
79
+ **Required Properties:**
80
+
81
+ - `name` (must match the key in the `customThemes` object and be a string)
82
+ - `type` (must be the string `"custom"`)
83
+ - `Background`
84
+ - `Foreground`
85
+ - `LightBlue`
86
+ - `AccentBlue`
87
+ - `AccentPurple`
88
+ - `AccentCyan`
89
+ - `AccentGreen`
90
+ - `AccentYellow`
91
+ - `AccentRed`
92
+ - `Comment`
93
+ - `Gray`
94
+
95
+ You can use either hex codes (e.g., `#FF0000`) **or** standard CSS color names (e.g., `coral`, `teal`, `blue`) for any color value. See [CSS color names](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#color_keywords) for a full list of supported names.
96
+
97
+ You can define multiple custom themes by adding more entries to the `customThemes` object.
98
+
99
+ ### Loading Themes from a File
100
+
101
+ In addition to defining custom themes in `settings.json`, you can also load a theme directly from a JSON file by specifying the file path in your `settings.json`. This is useful for sharing themes or keeping them separate from your main configuration.
102
+
103
+ To load a theme from a file, set the `theme` property in your `settings.json` to the path of your theme file:
104
+
105
+ ```json
106
+ {
107
+ "ui": {
108
+ "theme": "/path/to/your/theme.json"
109
+ }
110
+ }
111
+ ```
112
+
113
+ The theme file must be a valid JSON file that follows the same structure as a custom theme defined in `settings.json`.
114
+
115
+ **Example `my-theme.json`:**
116
+
117
+ ```json
118
+ {
119
+ "name": "My File Theme",
120
+ "type": "custom",
121
+ "Background": "#282A36",
122
+ "Foreground": "#F8F8F2",
123
+ "LightBlue": "#82AAFF",
124
+ "AccentBlue": "#61AFEF",
125
+ "AccentPurple": "#BD93F9",
126
+ "AccentCyan": "#8BE9FD",
127
+ "AccentGreen": "#50FA7B",
128
+ "AccentYellow": "#F1FA8C",
129
+ "AccentRed": "#FF5555",
130
+ "Comment": "#6272A4",
131
+ "Gray": "#ABB2BF",
132
+ "DiffAdded": "#A6E3A1",
133
+ "DiffRemoved": "#F38BA8",
134
+ "DiffModified": "#89B4FA",
135
+ "GradientColors": ["#4796E4", "#847ACE", "#C3677F"]
136
+ }
137
+ ```
138
+
139
+ **Security Note:** For your safety, Gemini CLI will only load theme files that are located within your home directory. If you attempt to load a theme from outside your home directory, a warning will be displayed and the theme will not be loaded. This is to prevent loading potentially malicious theme files from untrusted sources.
140
+
141
+ ### Example Custom Theme
142
+
143
+ <img src="https://gw.alicdn.com/imgextra/i1/O1CN01Em30Hc1jYXAdIgls3_!!6000000004560-2-tps-1009-629.png" alt=" " style="zoom:100%;text-align:center;margin: 0 auto;" />
144
+
145
+ ### Using Your Custom Theme
146
+
147
+ - Select your custom theme using the `/theme` command in Qwen Code. Your custom theme will appear in the theme selection dialog.
148
+ - Or, set it as the default by adding `"theme": "MyCustomTheme"` to the `ui` object in your `settings.json`.
149
+ - Custom themes can be set at the user, project, or system level, and follow the same [configuration precedence](../configuration/settings) as other settings.
150
+
151
+ ## Themes Preview
152
+
153
+ | Dark Theme | Preview | Light Theme | Preview |
154
+ | :----------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-----------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
155
+ | ANSI | <img src="https://gw.alicdn.com/imgextra/i2/O1CN01ZInJiq1GdSZc9gHsI_!!6000000000645-2-tps-1140-934.png" style="zoom:30%;text-align:center;margin: 0 auto;" /> | ANSI Light | <img src="https://gw.alicdn.com/imgextra/i2/O1CN01IiJQFC1h9E3MXQj6W_!!6000000004234-2-tps-1140-934.png" style="zoom:30%;text-align:center;margin: 0 auto;" /> |
156
+ | Atom OneDark | <img src="https://gw.alicdn.com/imgextra/i2/O1CN01Zlx1SO1Sw21SkTKV3_!!6000000002310-2-tps-1140-934.png" style="zoom:30%;text-align:center;margin: 0 auto;" /> | Ayu Light | <img src="https://gw.alicdn.com/imgextra/i3/O1CN01zEUc1V1jeUJsnCgQb_!!6000000004573-2-tps-1140-934.png" alt=" " style="zoom:30%;text-align:center;margin: 0 auto;" /> |
157
+ | Ayu | <img src="https://gw.alicdn.com/imgextra/i3/O1CN019upo6v1SmPhmRjzfN_!!6000000002289-2-tps-1140-934.png" alt=" " style="zoom:30%;text-align:center;margin: 0 auto;" /> | Default Light | <img src="https://gw.alicdn.com/imgextra/i4/O1CN01RHjrEs1u7TXq3M6l3_!!6000000005990-2-tps-1140-934.png" alt=" " style="zoom:30%;text-align:center;margin: 0 auto;" /> |
158
+ | Default | <img src="https://gw.alicdn.com/imgextra/i4/O1CN016pIeXz1pFC8owmR4Q_!!6000000005330-2-tps-1140-934.png" style="zoom:30%;text-align:center;margin: 0 auto;" /> | GitHub Light | <img src="https://gw.alicdn.com/imgextra/i4/O1CN01US2b0g1VETCPAVWLA_!!6000000002621-2-tps-1140-934.png" alt=" " style="zoom:30%;text-align:center;margin: 0 auto;" /> |
159
+ | Dracula | <img src="https://gw.alicdn.com/imgextra/i4/O1CN016htnWH20c3gd2LpUR_!!6000000006869-2-tps-1140-934.png" style="zoom:30%;text-align:center;margin: 0 auto;" /> | Google Code | <img src="https://gw.alicdn.com/imgextra/i1/O1CN01Ng29ab23iQ2BuYKz8_!!6000000007289-2-tps-1140-934.png" alt=" " style="zoom:30%;text-align:center;margin: 0 auto;" /> |
160
+ | GitHub | <img src="https://gw.alicdn.com/imgextra/i4/O1CN01fFCRda1IQIQ9qDNqv_!!6000000000887-2-tps-1140-934.png" alt=" " style="zoom:30%;text-align:center;margin: 0 auto;" /> | Xcode | <img src="https://gw.alicdn.com/imgextra/i1/O1CN010E3QAi1Huh5o1E9LN_!!6000000000818-2-tps-1140-934.png" alt=" " style="zoom:30%;text-align:center;margin: 0 auto;" /> |
@@ -0,0 +1,61 @@
1
+ # Trusted Folders
2
+
3
+ The Trusted Folders feature is a security setting that gives you control over which projects can use the full capabilities of the Qwen Code. It prevents potentially malicious code from running by asking you to approve a folder before the CLI loads any project-specific configurations from it.
4
+
5
+ ## Enabling the Feature
6
+
7
+ The Trusted Folders feature is **disabled by default**. To use it, you must first enable it in your settings.
8
+
9
+ Add the following to your user `settings.json` file:
10
+
11
+ ```json
12
+ {
13
+ "security": {
14
+ "folderTrust": {
15
+ "enabled": true
16
+ }
17
+ }
18
+ }
19
+ ```
20
+
21
+ ## How It Works: The Trust Dialog
22
+
23
+ Once the feature is enabled, the first time you run the Qwen Code from a folder, a dialog will automatically appear, prompting you to make a choice:
24
+
25
+ - **Trust folder**: Grants full trust to the current folder (e.g. `my-project`).
26
+ - **Trust parent folder**: Grants trust to the parent directory (e.g. `safe-projects`), which automatically trusts all of its subdirectories as well. This is useful if you keep all your safe projects in one place.
27
+ - **Don't trust**: Marks the folder as untrusted. The CLI will operate in a restricted "safe mode."
28
+
29
+ Your choice is saved in a central file (`~/.qwen/trustedFolders.json`), so you will only be asked once per folder.
30
+
31
+ ## Why Trust Matters: The Impact of an Untrusted Workspace
32
+
33
+ When a folder is **untrusted**, the Qwen Code runs in a restricted "safe mode" to protect you. In this mode, the following features are disabled:
34
+
35
+ 1. **Workspace Settings are Ignored**: The CLI will **not** load the `.qwen/settings.json` file from the project. This prevents the loading of custom tools and other potentially dangerous configurations.
36
+
37
+ 2. **Environment Variables are Ignored**: The CLI will **not** load any `.env` files from the project.
38
+
39
+ 3. **Extension Management is Restricted**: You **cannot install, update, or uninstall** extensions.
40
+
41
+ 4. **Tool Auto-Acceptance is Disabled**: You will always be prompted before any tool is run, even if you have auto-acceptance enabled globally.
42
+
43
+ 5. **Automatic Memory Loading is Disabled**: The CLI will not automatically load files into context from directories specified in local settings.
44
+
45
+ Granting trust to a folder unlocks the full functionality of the Qwen Code for that workspace.
46
+
47
+ ## Managing Your Trust Settings
48
+
49
+ If you need to change a decision or see all your settings, you have a couple of options:
50
+
51
+ - **Change the Current Folder's Trust**: Run the `/permissions` command from within the CLI. This will bring up the same interactive dialog, allowing you to change the trust level for the current folder.
52
+
53
+ - **View All Trust Rules**: To see a complete list of all your trusted and untrusted folder rules, you can inspect the contents of the `~/.qwen/trustedFolders.json` file in your home directory.
54
+
55
+ ## The Trust Check Process (Advanced)
56
+
57
+ For advanced users, it's helpful to know the exact order of operations for how trust is determined:
58
+
59
+ 1. **IDE Trust Signal**: If you are using the [IDE Integration](../ide-integration/ide-integration), the CLI first asks the IDE if the workspace is trusted. The IDE's response takes highest priority.
60
+
61
+ 2. **Local Trust File**: If the IDE is not connected, the CLI checks the central `~/.qwen/trustedFolders.json` file.
@@ -0,0 +1,73 @@
1
+ # Configuration
2
+
3
+ Qwen Code Termux Edition configuration is provider-neutral and follows the upstream CLI conventions.
4
+
5
+ ## Quick Setup
6
+
7
+ ### 1. Set your API key
8
+
9
+ ```bash
10
+ export OPENAI_API_KEY="..."
11
+ ```
12
+
13
+ ### 2. Optional: Custom endpoint
14
+
15
+ ```bash
16
+ export OPENAI_BASE_URL="https://your-gateway.example/v1"
17
+ ```
18
+
19
+ ### 3. Run
20
+
21
+ ```bash
22
+ qwen
23
+ ```
24
+
25
+ ## Common Options
26
+
27
+ ### Choose a model
28
+
29
+ ```bash
30
+ qwen -m "<model>"
31
+ ```
32
+
33
+ ### Non-interactive mode
34
+
35
+ ```bash
36
+ qwen -p "your prompt here"
37
+ ```
38
+
39
+ ### Interactive mode
40
+
41
+ ```bash
42
+ qwen
43
+ ```
44
+
45
+ ## Configuration Files
46
+
47
+ ### User settings
48
+
49
+ `~/.qwen/settings.json`
50
+
51
+ ### Project settings
52
+
53
+ `.qwen/settings.json` (in your project root)
54
+
55
+ ## Environment Variables
56
+
57
+ | Variable | Description |
58
+ | ----------------- | -------------------------- |
59
+ | `OPENAI_API_KEY` | Your API key |
60
+ | `OPENAI_BASE_URL` | Custom endpoint (optional) |
61
+ | `OPENAI_MODEL` | Default model (optional) |
62
+
63
+ ## Notes
64
+
65
+ - This Termux Edition avoids provider-specific guidance in `README.md`
66
+ - Keep provider details in your environment or shell aliases
67
+ - Upstream docs remain the reference for full CLI surface area
68
+
69
+ ## See Also
70
+
71
+ - [Test Reports](../test-reports/README.md)
72
+ - [Patches](../patches/README.md)
73
+ - [Build Notes](developers/BUILDING.md)
@@ -0,0 +1,9 @@
1
+ export default {
2
+ introduction: 'Introduction',
3
+ 'getting-started-extensions': {
4
+ display: 'hidden',
5
+ },
6
+ 'extension-releasing': {
7
+ display: 'hidden',
8
+ },
9
+ };
@@ -0,0 +1,204 @@
1
+ # Extension Releasing
2
+
3
+ There are three primary ways of releasing extensions to users:
4
+
5
+ - [Git repository](#releasing-through-a-git-repository)
6
+ - [Github Releases](#releasing-through-github-releases)
7
+ - [npm Registry](#releasing-through-npm-registry)
8
+
9
+ Git repository releases tend to be the simplest and most flexible approach, while GitHub releases can be more efficient on initial install as they are shipped as single archives instead of requiring a git clone which downloads each file individually. Github releases may also contain platform specific archives if you need to ship platform specific binary files. npm registry releases are ideal for teams that already use npm for package distribution, especially with private registries.
10
+
11
+ ## Releasing through a git repository
12
+
13
+ This is the most flexible and simple option. All you need to do us create a publicly accessible git repo (such as a public github repository) and then users can install your extension using `qwen extensions install <your-repo-uri>`, or for a GitHub repository they can use the simplified `qwen extensions install <org>/<repo>` format. They can optionally depend on a specific ref (branch/tag/commit) using the `--ref=<some-ref>` argument, this defaults to the default branch.
14
+
15
+ Whenever commits are pushed to the ref that a user depends on, they will be prompted to update the extension. Note that this also allows for easy rollbacks, the HEAD commit is always treated as the latest version regardless of the actual version in the `qwen-extension.json` file.
16
+
17
+ ### Managing release channels using a git repository
18
+
19
+ Users can depend on any ref from your git repo, such as a branch or tag, which allows you to manage multiple release channels.
20
+
21
+ For instance, you can maintain a `stable` branch, which users can install this way `qwen extensions install <your-repo-uri> --ref=stable`. Or, you could make this the default by treating your default branch as your stable release branch, and doing development in a different branch (for instance called `dev`). You can maintain as many branches or tags as you like, providing maximum flexibility for you and your users.
22
+
23
+ Note that these `ref` arguments can be tags, branches, or even specific commits, which allows users to depend on a specific version of your extension. It is up to you how you want to manage your tags and branches.
24
+
25
+ ### Example releasing flow using a git repo
26
+
27
+ While there are many options for how you want to manage releases using a git flow, we recommend treating your default branch as your "stable" release branch. This means that the default behavior for `qwen extensions install <your-repo-uri>` is to be on the stable release branch.
28
+
29
+ Lets say you want to maintain three standard release channels, `stable`, `preview`, and `dev`. You would do all your standard development in the `dev` branch. When you are ready to do a preview release, you merge that branch into your `preview` branch. When you are ready to promote your preview branch to stable, you merge `preview` into your stable branch (which might be your default branch or a different branch).
30
+
31
+ You can also cherry pick changes from one branch into another using `git cherry-pick`, but do note that this will result in your branches having a slightly divergent history from each other, unless you force push changes to your branches on each release to restore the history to a clean slate (which may not be possible for the default branch depending on your repository settings). If you plan on doing cherry picks, you may want to avoid having your default branch be the stable branch to avoid force-pushing to the default branch which should generally be avoided.
32
+
33
+ ## Releasing through Github releases
34
+
35
+ Qwen Code extensions can be distributed through [GitHub Releases](https://docs.github.com/en/repositories/releasing-projects-on-github/about-releases). This provides a faster and more reliable initial installation experience for users, as it avoids the need to clone the repository.
36
+
37
+ Each release includes at least one archive file, which contains the full contents of the repo at the tag that it was linked to. Releases may also include [pre-built archives](#custom-pre-built-archives) if your extension requires some build step or has platform specific binaries attached to it.
38
+
39
+ When checking for updates, qwen code will just look for the latest release on github (you must mark it as such when creating the release), unless the user installed a specific release by passing `--ref=<some-release-tag>`. We do not at this time support opting in to pre-release releases or semver.
40
+
41
+ ### Custom pre-built archives
42
+
43
+ Custom archives must be attached directly to the github release as assets and must be fully self-contained. This means they should include the entire extension, see [archive structure](#archive-structure).
44
+
45
+ If your extension is platform-independent, you can provide a single generic asset. In this case, there should be only one asset attached to the release.
46
+
47
+ Custom archives may also be used if you want to develop your extension within a larger repository, you can build an archive which has a different layout from the repo itself (for instance it might just be an archive of a subdirectory containing the extension).
48
+
49
+ #### Platform specific archives
50
+
51
+ To ensure Qwen Code can automatically find the correct release asset for each platform, you must follow this naming convention. The CLI will search for assets in the following order:
52
+
53
+ 1. **Platform and Architecture-Specific:** `{platform}.{arch}.{name}.{extension}`
54
+ 2. **Platform-Specific:** `{platform}.{name}.{extension}`
55
+ 3. **Generic:** If only one asset is provided, it will be used as a generic fallback.
56
+
57
+ - `{name}`: The name of your extension.
58
+ - `{platform}`: The operating system. Supported values are:
59
+ - `darwin` (macOS)
60
+ - `linux`
61
+ - `win32` (Windows)
62
+ - `{arch}`: The architecture. Supported values are:
63
+ - `x64`
64
+ - `arm64`
65
+ - `{extension}`: The file extension of the archive (e.g., `.tar.gz` or `.zip`).
66
+
67
+ **Examples:**
68
+
69
+ - `darwin.arm64.my-tool.tar.gz` (specific to Apple Silicon Macs)
70
+ - `darwin.my-tool.tar.gz` (for all Macs)
71
+ - `linux.x64.my-tool.tar.gz`
72
+ - `win32.my-tool.zip`
73
+
74
+ #### Archive structure
75
+
76
+ Archives must be fully contained extensions and have all the standard requirements - specifically the `qwen-extension.json` file must be at the root of the archive.
77
+
78
+ The rest of the layout should look exactly the same as a typical extension, see [extensions.md](extension.md).
79
+
80
+ #### Example GitHub Actions workflow
81
+
82
+ Here is an example of a GitHub Actions workflow that builds and releases a Qwen Code extension for multiple platforms:
83
+
84
+ ```yaml
85
+ name: Release Extension
86
+
87
+ on:
88
+ push:
89
+ tags:
90
+ - 'v*'
91
+
92
+ jobs:
93
+ release:
94
+ runs-on: ubuntu-latest
95
+ steps:
96
+ - uses: actions/checkout@v3
97
+
98
+ - name: Set up Node.js
99
+ uses: actions/setup-node@v3
100
+ with:
101
+ node-version: '20'
102
+
103
+ - name: Install dependencies
104
+ run: npm ci
105
+
106
+ - name: Build extension
107
+ run: npm run build
108
+
109
+ - name: Create release assets
110
+ run: |
111
+ npm run package -- --platform=darwin --arch=arm64
112
+ npm run package -- --platform=linux --arch=x64
113
+ npm run package -- --platform=win32 --arch=x64
114
+
115
+ - name: Create GitHub Release
116
+ uses: softprops/action-gh-release@v1
117
+ with:
118
+ files: |
119
+ release/darwin.arm64.my-tool.tar.gz
120
+ release/linux.arm64.my-tool.tar.gz
121
+ release/win32.arm64.my-tool.zip
122
+ ```
123
+
124
+ ## Releasing through npm registry
125
+
126
+ You can publish Qwen Code extensions as scoped npm packages (e.g. `@your-org/my-extension`). This is a good fit when:
127
+
128
+ - Your team already uses npm for package distribution
129
+ - You need private registry support with existing auth infrastructure
130
+ - You want version resolution and access control handled by npm
131
+
132
+ ### Package requirements
133
+
134
+ Your npm package must include a `qwen-extension.json` file at the package root. This is the same config file used by all Qwen Code extensions — the npm tarball is simply another delivery mechanism.
135
+
136
+ A minimal package structure looks like:
137
+
138
+ ```
139
+ my-extension/
140
+ ├── package.json
141
+ ├── qwen-extension.json
142
+ ├── QWEN.md # optional context file
143
+ ├── commands/ # optional custom commands
144
+ ├── skills/ # optional custom skills
145
+ └── agents/ # optional custom subagents
146
+ ```
147
+
148
+ Make sure `qwen-extension.json` is included in your published package (i.e. not excluded by `.npmignore` or the `files` field in `package.json`).
149
+
150
+ ### Publishing
151
+
152
+ Use standard npm publishing tools:
153
+
154
+ ```bash
155
+ # Publish to the default registry
156
+ npm publish
157
+
158
+ # Publish to a private/custom registry
159
+ npm publish --registry https://your-registry.com
160
+ ```
161
+
162
+ ### Installation
163
+
164
+ Users install your extension using the scoped package name:
165
+
166
+ ```bash
167
+ # Install latest version
168
+ qwen extensions install @your-org/my-extension
169
+
170
+ # Install a specific version
171
+ qwen extensions install @your-org/my-extension@1.2.0
172
+
173
+ # Install from a custom registry
174
+ qwen extensions install @your-org/my-extension --registry https://your-registry.com
175
+ ```
176
+
177
+ ### Update behavior
178
+
179
+ - Extensions installed without a version pin (e.g. `@scope/pkg`) track the `latest` dist-tag.
180
+ - Extensions installed with a dist-tag (e.g. `@scope/pkg@beta`) track that specific tag.
181
+ - Extensions pinned to an exact version (e.g. `@scope/pkg@1.2.0`) are always considered up-to-date and will not prompt for updates.
182
+
183
+ ### Authentication for private registries
184
+
185
+ Qwen Code reads npm auth credentials automatically:
186
+
187
+ 1. **`NPM_TOKEN` environment variable** — highest priority
188
+ 2. **`.npmrc` file** — supports both host-level and path-scoped `_authToken` entries (e.g. `//your-registry.com/:_authToken=TOKEN` or `//pkgs.dev.azure.com/org/_packaging/feed/npm/registry/:_authToken=TOKEN`)
189
+
190
+ `.npmrc` files are read from the current directory and the user's home directory.
191
+
192
+ ### Managing release channels
193
+
194
+ You can use npm dist-tags to manage release channels:
195
+
196
+ ```bash
197
+ # Publish a beta release
198
+ npm publish --tag beta
199
+
200
+ # Users install beta channel
201
+ qwen extensions install @your-org/my-extension@beta
202
+ ```
203
+
204
+ This works similarly to git branch-based release channels but uses npm's native dist-tag mechanism.