O‘rnatuvchi ichki tuzilishi¶
OpenClaw openclaw.ai dan taqdim etiladigan uchta o‘rnatish skriptini yetkazib beradi.
| Skript | Platforma | Nima qiladi |
|---|---|---|
install.sh |
macOS / Linux / WSL | Zarurat bo‘lsa Node’ni o‘rnatadi, OpenClaw’ni npm (standart) yoki git orqali o‘rnatadi va onboarding jarayonini ishga tushirishi mumkin. |
install-cli.sh |
macOS / Linux / WSL | Installs Node + OpenClaw into a local prefix (~/.openclaw). Root huquqi talab etilmaydi. |
install.ps1 |
Windows (PowerShell) | Agar kerak bo‘lsa Node’ni o‘rnatadi, OpenClaw’ni npm (standart) yoki git orqali o‘rnatadi va onboarding’ni ishga tushirishi mumkin. |
Quick commands¶
bash
curl -fsSL --proto '=https' --tlsv1.2 https://openclaw.ai/install.sh | bash
````
```bash
curl -fsSL --proto '=https' --tlsv1.2 https://openclaw.ai/install.sh | bash -s -- --help
```
````
bash
curl -fsSL --proto '=https' --tlsv1.2 https://openclaw.ai/install-cli.sh | bash
````
```bash
curl -fsSL --proto '=https' --tlsv1.2 https://openclaw.ai/install-cli.sh | bash -s -- --help
```
````
powershell
iwr -useb https://openclaw.ai/install.ps1 | iex
````
```powershell
& ([scriptblock]::Create((iwr -useb https://openclaw.ai/install.ps1))) -Tag beta -NoOnboard -DryRun
```
````
openclaw is not found in a new terminal, see Node.js troubleshooting.
install.sh¶
Flow (install.sh)¶
npm method (default): global npm install
- git method: clone/update repo, install deps with pnpm, build, then install wrapper at ~/.local/bin/openclaw
openclaw doctor --non-interactive on upgrades and git installs (best effort)
- Attempts onboarding when appropriate (TTY available, onboarding not disabled, and bootstrap/config checks pass)
- Defaults SHARP_IGNORE_GLOBAL_LIBVIPS=1
Source checkout detection¶
If run inside an OpenClaw checkout (package.json + pnpm-workspace.yaml), the script offers:
- use checkout (
git), or - use global install (
npm)
If no TTY is available and no install method is set, it defaults to npm and warns.
The script exits with code 2 for invalid method selection or invalid --install-method values.
Examples (install.sh)¶
bash
curl -fsSL --proto '=https' --tlsv1.2 https://openclaw.ai/install.sh | bash
bash
curl -fsSL --proto '=https' --tlsv1.2 https://openclaw.ai/install.sh | bash -s -- --no-onboard
bash
curl -fsSL --proto '=https' --tlsv1.2 https://openclaw.ai/install.sh | bash -s -- --install-method git
bash
curl -fsSL --proto '=https' --tlsv1.2 https://openclaw.ai/install.sh | bash -s -- --dry-run
| Flag | Description |
|---|---|
--install-method npm\\|git |
O‘rnatish usulini tanlang (standart: npm). Alias: --method |
--npm |
npm usuli uchun qisqartma |
--git |
git usuli uchun qisqartma. Alias: --github |
--version <version\\|dist-tag> |
npm versiyasi yoki dist-tag (standart: latest) |
--beta |
Agar mavjud bo‘lsa beta dist-tag’dan foydalaning, aks holda latest ga qayting |
--git-dir <path> |
Checkout katalogi (standart: ~/openclaw). Alias: --dir |
--no-git-update |
Mavjud checkout uchun git pull ni o‘tkazib yuborish |
--no-prompt |
So‘rovlarni o‘chirish |
--no-onboard |
Onboarding’ni o‘tkazib yuborish |
--onboard |
Onboarding’ni yoqish |
--dry-run |
O‘zgarishlarni qo‘llamasdan, bajariladigan amallarni chiqarish |
--verbose |
Debug chiqishini yoqish (set -x, npm notice-darajadagi loglar) |
--help |
Foydalanish bo‘yicha ma’lumotni ko‘rsatish (-h) |
| O‘zgaruvchi | Tavsif |
|---|---|
OPENCLAW_INSTALL_METHOD=git\\|npm |
O‘rnatish usuli |
OPENCLAW_VERSION=latest\\|next\\|<semver> |
npm versiyasi yoki dist-tag |
OPENCLAW_BETA=0\\|1 |
Agar mavjud bo‘lsa betadan foydalanish |
OPENCLAW_GIT_DIR=<path> |
Checkout katalogi |
OPENCLAW_GIT_UPDATE=0\\|1 |
git yangilanishlarini yoqish/o‘chirish |
OPENCLAW_NO_PROMPT=1 |
So‘rovlarni o‘chirish |
OPENCLAW_NO_ONBOARD=1 |
Onboarding’ni o‘tkazib yuborish |
OPENCLAW_DRY_RUN=1 |
Dry run rejimi |
OPENCLAW_VERBOSE=1 |
Debug rejimi |
OPENCLAW_NPM_LOGLEVEL=error\\|warn\\|notice |
npm log darajasi |
SHARP_IGNORE_GLOBAL_LIBVIPS=0\\|1 |
sharp/libvips xatti-harakatini boshqarish (standart: 1) |
install-cli.sh¶
~/.openclaw) va tizimdagi Node’ga bog‘liqlik yo‘q.
Jarayon (install-cli.sh)¶
22.22.0) ga yuklab oladi<prefix>/tools/node-v<version> va SHA-256 ni tekshiradi.--prefix yordamida o‘rnatadi, so‘ng wrapper’ni ga yozadi
Misollar (install-cli.sh)¶
bash
curl -fsSL --proto '=https' --tlsv1.2 https://openclaw.ai/install-cli.sh | bashbash
curl -fsSL --proto '=https' --tlsv1.2 https://openclaw.ai/install-cli.sh | bash -s -- --prefix /opt/openclaw --version latestbash
curl -fsSL --proto '=https' --tlsv1.2 https://openclaw.ai/install-cli.sh | bash -s -- --json --prefix /opt/openclawbash
curl -fsSL --proto '=https' --tlsv1.2 https://openclaw.ai/install-cli.sh | bash -s -- --onboard
| Bayroq | Tavsif |
|---|---|
--prefix <path> |
O‘rnatish prefiksi (standart: ~/.openclaw) |
--version <ver> |
OpenClaw versiyasi yoki dist-teg (standart: latest) |
--node-version <ver> |
Node versiyasi (standart: 22.22.0) |
--json |
NDJSON hodisalarini chiqaradi |
--onboard |
O‘rnatishdan so‘ng openclaw onboard ni ishga tushiradi |
--no-onboard |
Onboarding’ni o‘tkazib yuboradi (standart) |
--set-npm-prefix |
Linux’da joriy prefiks yozish uchun ruxsatli bo‘lmasa, npm prefiksini majburan ~/.npm-global ga o‘rnatadi |
--help |
Foydalanishni ko‘rsatadi (-h) |
| O‘zgaruvchi | Tavsif |
|---|---|
OPENCLAW_PREFIX=<path> |
O‘rnatish prefiksi |
OPENCLAW_VERSION=<ver> |
OpenClaw versiyasi yoki dist-teg |
OPENCLAW_NODE_VERSION=<ver> |
Node versiyasi |
OPENCLAW_NO_ONBOARD=1 |
Onboarding’ni o‘tkazib yuboradi |
OPENCLAW_NPM_LOGLEVEL=error\\|warn\\|notice |
npm jurnal darajasi |
OPENCLAW_GIT_DIR=<path> |
Eski tozalash uchun qidiruv yo‘li (eski Peekaboo submodule checkout’ni olib tashlashda ishlatiladi) |
SHARP_IGNORE_GLOBAL_LIBVIPS=0\\|1 |
Control sharp/libvips behavior (default: 1) |
install.ps1¶
Flow (install.ps1)¶
npm method (default): global npm install using selected -Tag
- git method: clone/update repo, install/build with pnpm, and install wrapper at %USERPROFILE%\.local\bin\openclaw.cmd
openclaw doctor --non-interactive on upgrades and git installs (best effort).
Examples (install.ps1)¶
powershell
iwr -useb https://openclaw.ai/install.ps1 | iex
powershell
& ([scriptblock]::Create((iwr -useb https://openclaw.ai/install.ps1))) -InstallMethod git
powershell
& ([scriptblock]::Create((iwr -useb https://openclaw.ai/install.ps1))) -InstallMethod git -GitDir "C:\openclaw"
powershell
& ([scriptblock]::Create((iwr -useb https://openclaw.ai/install.ps1))) -DryRun
| Flag | Description |
|---|---|
-InstallMethod npm\\|git |
Install method (default: npm) |
-Tag <tag> |
npm dist-tag (default: latest) |
-GitDir <path> |
Checkout directory (default: %USERPROFILE%\openclaw) |
-NoOnboard |
Skip onboarding |
-NoGitUpdate |
Skip git pull |
-DryRun |
Print actions only |
| Variable | Description |
|---|---|
OPENCLAW_INSTALL_METHOD=git\\|npm |
Install method |
OPENCLAW_GIT_DIR=<path> |
Checkout directory |
OPENCLAW_NO_ONBOARD=1 |
Skip onboarding |
OPENCLAW_GIT_UPDATE=0 |
Disable git pull |
OPENCLAW_DRY_RUN=1 |
Dry run mode |
-InstallMethod git is used and Git is missing, the script exits and prints the Git for Windows link.
CI and automation¶
Use non-interactive flags/env vars for predictable runs.
bash
curl -fsSL --proto '=https' --tlsv1.2 https://openclaw.ai/install.sh | bash -s -- --no-prompt --no-onboard
bash
OPENCLAW_INSTALL_METHOD=git OPENCLAW_NO_PROMPT=1 \
curl -fsSL --proto '=https' --tlsv1.2 https://openclaw.ai/install.sh | bash
bash
curl -fsSL --proto '=https' --tlsv1.2 https://openclaw.ai/install-cli.sh | bash -s -- --json --prefix /opt/openclaw
powershell
& ([scriptblock]::Create((iwr -useb https://openclaw.ai/install.ps1))) -NoOnboard
Troubleshooting¶
git install method. npm orqali o‘rnatishda, bog‘liqliklar git URLlardan foydalanganda spawn git ENOENT xatolarini oldini olish uchun Git hali ham tekshiriladi/o‘rnatiladi.
install.sh prefixni ~/.npm-global ga o‘zgartirishi va (agar mavjud bo‘lsa) shell rc fayllariga PATH eksportlarini qo‘shishi mumkin.
SHARP_IGNORE_GLOBAL_LIBVIPS=1 ni o‘rnatadi. Bekor qilish uchun:
````
```bash
SHARP_IGNORE_GLOBAL_LIBVIPS=0 curl -fsSL --proto '=https' --tlsv1.2 https://openclaw.ai/install.sh | bash
```
````
npm config get prefix ni ishga tushiring, oxiriga \bin qo‘shing, o‘sha katalogni foydalanuvchi PATH’iga qo‘shing, so‘ng PowerShell’ni qayta oching.