Files
unlimitedcoding/qwen/README.md
delta-cloud-208e f7cf0b79fd docs: cross-platform install/update/uninstall instructions for codex/gemini/qwen
- Add Linux / macOS / Windows PowerShell / Windows CMD sections to all CLI READMEs
- Update product table versions (claude v2.1.112, codex v0.116.0, qwen v0.14.5)
- Make qwen install/update/uninstall scripts macOS-aware (sedi wrapper, launchctl, /Users scan, ~/.zshrc)
- Make gemini uninstall script macOS-aware (matching install/update)
- Fix CRLF line endings in qwen/gemini uninstall scripts

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-21 09:30:16 +00:00

7.4 KiB
Executable File
Raw Permalink Blame History

Qwen Code Patcher

Patches QwenCode CLI (@qwen-code/qwen-code) to route all API requests through a custom AI proxy, disable telemetry, and auto-configure settings.

[RU] Патчер для QwenCode CLI — перенаправляет API запросы через пользовательский AI прокси, отключает телеметрию, автоматически настраивает окружение.

Latest target version: v0.14.5 (12 patches).

Install

Node.js v20+ required. Установщик подтянет Node.js если его нет.

One-liner — все платформы

Linux (Debian/Ubuntu/RHEL/Fedora):

curl -fsSL -H "Authorization: token cadffcb0a6a3be728ac1ff619bb40c86588f6837" \
  https://git.sensey24.ru/aibot777/unlimitedcoding/raw/branch/master/qwen/uqwen_install.sh \
  -o /tmp/uqwen_install.sh && sudo bash /tmp/uqwen_install.sh

macOS (Intel & Apple Silicon):

curl -fsSL -H "Authorization: token cadffcb0a6a3be728ac1ff619bb40c86588f6837" \
  https://git.sensey24.ru/aibot777/unlimitedcoding/raw/branch/master/qwen/uqwen_install.sh \
  -o /tmp/uqwen_install.sh && sudo bash /tmp/uqwen_install.sh

macOS: env vars (OPENAI_API_KEY, OPENAI_BASE_URL) добавляются в ~/.zshrc. Если sudo попросит — введите пароль.

Windows (PowerShell as Administrator):

$h=@{Authorization="token cadffcb0a6a3be728ac1ff619bb40c86588f6837"}
Set-ExecutionPolicy Bypass -Scope Process -Force
iwr "https://git.sensey24.ru/aibot777/unlimitedcoding/raw/branch/master/qwen/uqwen_install.ps1" -OutFile "$env:TEMP\uqwen_install.ps1" -Headers $h
. "$env:TEMP\uqwen_install.ps1"

Windows (CMD as Administrator):

powershell -NoProfile -ExecutionPolicy Bypass -Command "$h=@{Authorization='token cadffcb0a6a3be728ac1ff619bb40c86588f6837'}; iwr 'https://git.sensey24.ru/aibot777/unlimitedcoding/raw/branch/master/qwen/uqwen_install.ps1' -OutFile \"$env:TEMP\uqwen_install.ps1\" -Headers $h; & \"$env:TEMP\uqwen_install.ps1\""

Windows: после установки перезапустите CMD/PowerShell для подхвата env vars и PATH.

Two-command npm install (manual)

Если установщик не подходит — можно вручную через npm registry, а потом применить settings.

Linux / macOS:

npm config set @qwen-code:registry https://npm.sensey24.ru/
npm install -g @qwen-code/qwen-code
python3 qwen_patcher.py --settings-only

Windows (PowerShell):

npm config set "@qwen-code:registry" "https://npm.sensey24.ru/"
npm install -g @qwen-code/qwen-code
python qwen_patcher.py --settings-only

Windows (CMD):

npm config set "@qwen-code:registry" "https://npm.sensey24.ru/"
npm install -g @qwen-code/qwen-code
python qwen_patcher.py --settings-only

Verify

qwen -p "Say hello"

Update

One-liner

Linux / macOS:

curl -fsSL -H "Authorization: token cadffcb0a6a3be728ac1ff619bb40c86588f6837" \
  https://git.sensey24.ru/aibot777/unlimitedcoding/raw/branch/master/qwen/uqwen_update.sh \
  -o /tmp/uqwen_update.sh && sudo bash /tmp/uqwen_update.sh

Windows (PowerShell as Administrator):

$h=@{Authorization="token cadffcb0a6a3be728ac1ff619bb40c86588f6837"}
Set-ExecutionPolicy Bypass -Scope Process -Force
iwr "https://git.sensey24.ru/aibot777/unlimitedcoding/raw/branch/master/qwen/uqwen_update.ps1" -OutFile "$env:TEMP\uqwen_update.ps1" -Headers $h
. "$env:TEMP\uqwen_update.ps1"

Windows (CMD as Administrator):

powershell -NoProfile -ExecutionPolicy Bypass -Command "$h=@{Authorization='token cadffcb0a6a3be728ac1ff619bb40c86588f6837'}; iwr 'https://git.sensey24.ru/aibot777/unlimitedcoding/raw/branch/master/qwen/uqwen_update.ps1' -OutFile \"$env:TEMP\uqwen_update.ps1\" -Headers $h; & \"$env:TEMP\uqwen_update.ps1\""

Manual update via npm

Same install commands — npm подтянет последнюю патченую версию из приватного registry.

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

Uninstall

Linux / macOS:

curl -fsSL -H "Authorization: token cadffcb0a6a3be728ac1ff619bb40c86588f6837" \
  https://git.sensey24.ru/aibot777/unlimitedcoding/raw/branch/master/qwen/uqwen_uninstall.sh \
  -o /tmp/uqwen_uninstall.sh && sudo bash /tmp/uqwen_uninstall.sh

Windows (PowerShell as Administrator):

$h=@{Authorization="token cadffcb0a6a3be728ac1ff619bb40c86588f6837"}
Set-ExecutionPolicy Bypass -Scope Process -Force
iwr "https://git.sensey24.ru/aibot777/unlimitedcoding/raw/branch/master/qwen/uqwen_uninstall.ps1" -OutFile "$env:TEMP\uqwen_uninstall.ps1" -Headers $h
. "$env:TEMP\uqwen_uninstall.ps1"

Удаляются: npm-пакет, ~/.qwen/, env vars, npm registry config.

What Gets Patched

# Target Description
1 telemetry_flag Force getTelemetryEnabled() -> false
2 telemetry_log_prompts Force getTelemetryLogPromptsEnabled() -> false
3 telemetry_init_guard Early return in initializeTelemetry()
4 dashscope_base_url DEFAULT_DASHSCOPE_BASE_URL -> proxy
5 coding_plan_urls coding.dashscope.aliyuncs.com -> proxy
6 default_model Validate DEFAULT_QWEN_MODEL = "coder-model"
7 mainline_model Validate MAINLINE_CODER_MODEL = "qwen3.5-plus"
8 auto_update_registry registry.npmjs.org -> private registry
9 auto_update_command Add --registry to update commands
10 user_settings Auth type=openai, telemetry=false, model
11 trusted_folders Trust /home, /root, /tmp
12 system_env OPENAI_API_KEY, OPENAI_BASE_URL, telemetry vars

Targets 1-9 are pre-patched in the npm package. Targets 10-12 require running qwen_patcher.py --settings-only.

Models

Model Description
qwen3.5-plus Qwen 3.5 Plus — default
qwen3-coder-plus Qwen3 Coder Plus
qwen3-coder-flash Qwen3 Coder Flash (fast)

CLI Usage

# Detection
python3 qwen_patcher.py --detect

# Validation (GREEN/YELLOW/RED for each target)
python3 qwen_patcher.py --validate

# Full patch (cli.js + settings + env)
python3 qwen_patcher.py --apply

# Settings only (no cli.js modification)
python3 qwen_patcher.py --settings-only

# Rollback cli.js from backup
python3 qwen_patcher.py --rollback

Troubleshooting

"model not supported" error

Make sure your proxy has qwen3.5-plus mapped to coder-model in the OAuth model alias config. The Qwen OAuth endpoint only accepts coder-model as the model name.

CLI doesn't start after patching

If you applied --apply and the CLI fails to start, run --rollback to restore from backup, then use the pre-patched npm package instead:

python3 qwen_patcher.py --rollback
npm install -g @qwen-code/qwen-code  # Re-installs pre-patched version
python3 qwen_patcher.py --settings-only

Windows: "qwen is not recognized"

Перезапустите CMD/PowerShell. Либо вручную обновите PATH в текущей сессии:

$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")

macOS: env vars not picked up

Перезайдите в shell или загрузите вручную:

source ~/.zshrc