Skip to content

Support OpenCode-style installer and standalone executable #3728

@pomelo-nwu

Description

@pomelo-nwu

Support OpenCode-style installer and standalone executable

Summary

It would be great if Qwen Code could support an OpenCode-style installation flow:

curl -fsSL https://qwen-code.ai/install | bash

and distribute platform-specific standalone executables, so users do not need to install or modify Node.js/npm/nvm just to run Qwen Code.

Motivation

Today, Qwen Code is mainly installed through npm:

npm install -g @qwen-code/qwen-code@latest

The current quick installer helps by installing Node.js via NVM and then installing Qwen Code globally via npm. However, this still introduces several sources of friction:

  • It depends on Node.js/npm/nvm.
  • It may modify shell profiles, npm prefix, or ~/.npmrc.
  • It can be affected by existing npm configuration or permission issues.
  • It is harder to use in enterprise, CI, or locked-down environments.
  • Installing or rolling back to a specific version is less predictable than downloading a fixed binary artifact.

A standalone executable distribution would make Qwen Code easier to install, easier to deploy, and less dependent on the user's local Node/npm environment.

Proposal

Provide release artifacts such as:

qwen-darwin-arm64.tar.gz
qwen-darwin-x64.tar.gz
qwen-linux-arm64.tar.gz
qwen-linux-x64.tar.gz
qwen-windows-x64.zip
checksums.txt

The install script could:

  1. Detect OS and architecture.

  2. Download the matching artifact.

  3. Install it into a user-local directory, for example:

    ~/.qwen/bin/qwen
    
  4. Add it to PATH when appropriate.

  5. Support options such as:

    --version <version>
    --no-modify-path
    --help

Notes

There is already related work in PR #302:

#302

That PR explores building Qwen Code into platform-specific executables with Bun. It could be a good starting point, but a complete solution would also need to handle runtime assets such as locales, bundled skills, docs, vendor binaries, sandbox profiles, checksums, release artifacts, and installer logic.

中文说明

支持类似 OpenCode 的安装脚本和 standalone executable

概述

希望 Qwen Code 支持类似 OpenCode 的一键安装方式:

curl -fsSL https://qwen-code.ai/install | bash

并提供平台对应的 standalone executable,让用户无需提前安装或修改 Node.js/npm/nvm 环境即可运行 Qwen Code。

动机

目前 Qwen Code 主要通过 npm 安装:

npm install -g @qwen-code/qwen-code@latest

现有的一键安装脚本虽然会自动安装 Node.js 和 npm package,但仍然有一些使用门槛:

  • 依赖 Node.js/npm/nvm。
  • 可能会修改 shell profile、npm prefix 或 ~/.npmrc
  • 容易受到用户已有 npm 配置或权限问题影响。
  • 在企业环境、CI 环境、受限机器上部署不够稳定。
  • 指定版本安装和回滚不如固定 binary artifact 可控。

如果支持 standalone executable,Qwen Code 的安装和部署会更简单、更稳定,也更少依赖用户本机的 Node/npm 环境。

建议方案

可以提供类似下面的 release artifacts:

qwen-darwin-arm64.tar.gz
qwen-darwin-x64.tar.gz
qwen-linux-arm64.tar.gz
qwen-linux-x64.tar.gz
qwen-windows-x64.zip
checksums.txt

安装脚本负责:

  1. 检测 OS 和 CPU 架构。

  2. 下载对应平台的 artifact。

  3. 安装到用户目录,例如:

    ~/.qwen/bin/qwen
    
  4. 适当更新 PATH。

  5. 支持常见参数:

    --version <version>
    --no-modify-path
    --help

备注

已有相关 PR:

#302

这个 PR 已经尝试用 Bun 将 Qwen Code 构建成多平台 executable,可以作为起点。不过完整方案还需要继续处理 runtime assets,例如 locales、bundled skills、docs、vendor binaries、sandbox profiles,以及 checksums、release artifacts 和安装脚本逻辑。

Metadata

Metadata

Assignees

Labels

category/cliCommand line interface and interactionpriority/P1High priority issuetype/feature-requestNew feature or enhancement request

Type

No type
No fields configured for issues without a type.

Projects

Status
In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions