Internos del instalador¶
OpenClaw incluye tres scripts de instalación, servidos desde openclaw.ai.
| Script | Plataforma | Qué hace |
|---|---|---|
install.sh |
macOS / Linux / WSL | Instala Node si es necesario, instala OpenClaw vía npm (predeterminado) o git, y puede ejecutar el onboarding. |
install-cli.sh |
macOS / Linux / WSL | Instala Node + OpenClaw en un prefijo local (~/.openclaw). No requiere root. |
install.ps1 |
Windows (PowerShell) | Instala Node si es necesario, instala OpenClaw vía npm (predeterminado) o git, y puede ejecutar el onboarding. |
Comandos rápidos¶
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 no se encuentra en una nueva terminal, consulte Solución de problemas de Node.js.
install.sh¶
Flujo (install.sh)¶
npm (predeterminado): instalación global con npm
- Método git: clonar/actualizar el repositorio, instalar dependencias con pnpm, compilar y luego instalar el wrapper en ~/.local/bin/openclaw
openclaw doctor --non-interactive en actualizaciones e instalaciones por git (mejor esfuerzo)
- Intenta el onboarding cuando corresponde (TTY disponible, onboarding no deshabilitado y pasan las comprobaciones de bootstrap/configuración)
- Predetermina SHARP_IGNORE_GLOBAL_LIBVIPS=1
Detección de checkout de código fuente¶
Si se ejecuta dentro de un checkout de OpenClaw (package.json + pnpm-workspace.yaml), el script ofrece:
- usar el checkout (
git), o - usar la instalación global (
npm)
Si no hay TTY disponible y no se establece un método de instalación, se usa por defecto npm y se muestra una advertencia.
El script finaliza con el código 2 para una selección de método no válida o valores de --install-method no válidos.
Ejemplos (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 | Descripción |
|---|---|
--install-method npm\\|git |
Elegir método de instalación (predeterminado: npm). Alias: --method |
--npm |
Atajo para el método npm |
--git |
Atajo para el método git. Alias: --github |
--version <version\\|dist-tag> |
Versión de npm o dist-tag (predeterminado: latest) |
--beta |
Usar dist-tag beta si está disponible; de lo contrario, volver a latest |
--git-dir <path> |
Directorio de checkout (predeterminado: ~/openclaw). Alias: --dir |
--no-git-update |
Omitir git pull para un checkout existente |
--no-prompt |
Deshabilitar solicitudes |
--no-onboard |
Omitir onboarding |
--onboard |
Habilitar onboarding |
--dry-run |
Imprimir acciones sin aplicar cambios |
--verbose |
Habilitar salida de depuración (set -x, registros de npm a nivel notice) |
--help |
Mostrar uso (-h) |
| Variable | Descripción |
|---|---|
OPENCLAW_INSTALL_METHOD=git\\|npm |
Método de instalación |
OPENCLAW_VERSION=latest\\|next\\|<semver> |
Versión de npm o dist-tag |
OPENCLAW_BETA=0\\|1 |
Usar beta si está disponible |
OPENCLAW_GIT_DIR=<path> |
Directorio de checkout |
OPENCLAW_GIT_UPDATE=0\\|1 |
Alternar actualizaciones por git |
OPENCLAW_NO_PROMPT=1 |
Deshabilitar solicitudes |
OPENCLAW_NO_ONBOARD=1 |
Omitir onboarding |
OPENCLAW_DRY_RUN=1 |
Modo de ejecución seca |
OPENCLAW_VERBOSE=1 |
Modo de depuración |
OPENCLAW_NPM_LOGLEVEL=error\\|warn\\|notice |
Nivel de registro de npm |
SHARP_IGNORE_GLOBAL_LIBVIPS=0\\|1 |
Controlar el comportamiento de sharp/libvips (predeterminado: 1) |
install-cli.sh¶
~/.openclaw) y sin dependencia de Node del sistema.
Flujo (install-cli.sh)¶
22.22.0) en <prefix>/tools/node-v<version> y verifica SHA-256.
--prefix <prefix>, luego escribe el wrapper en <prefix>/bin/openclaw.
Ejemplos (install-cli.sh)¶
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 -- --prefix /opt/openclaw --version latest
bash
curl -fsSL --proto '=https' --tlsv1.2 https://openclaw.ai/install-cli.sh | bash -s -- --json --prefix /opt/openclaw
bash
curl -fsSL --proto '=https' --tlsv1.2 https://openclaw.ai/install-cli.sh | bash -s -- --onboard
| Flag | Descripción |
|---|---|
--prefix <path> |
Prefijo de instalación (predeterminado: ~/.openclaw) |
--version <ver> |
Versión de OpenClaw o dist-tag (predeterminado: latest) |
--node-version <ver> |
Versión de Node (predeterminado: 22.22.0) |
--json |
Emitir eventos NDJSON |
--onboard |
Ejecutar openclaw onboard después de la instalación |
--no-onboard |
Omitir onboarding (predeterminado) |
--set-npm-prefix |
En Linux, forzar el prefijo de npm a ~/.npm-global si el prefijo actual no es escribible |
--help |
Mostrar uso (-h) |
| Variable | Descripción |
|---|---|
OPENCLAW_PREFIX=<path> |
Prefijo de instalación |
OPENCLAW_VERSION=<ver> |
Versión de OpenClaw o dist-tag |
OPENCLAW_NODE_VERSION=<ver> |
Versión de Node |
OPENCLAW_NO_ONBOARD=1 |
Omitir onboarding |
OPENCLAW_NPM_LOGLEVEL=error\\|warn\\|notice |
Nivel de registro de npm |
OPENCLAW_GIT_DIR=<path> |
Ruta de búsqueda de limpieza heredada (usada al eliminar un checkout antiguo del submódulo Peekaboo) |
SHARP_IGNORE_GLOBAL_LIBVIPS=0\\|1 |
Controlar el comportamiento de sharp/libvips (predeterminado: 1) |
install.ps1¶
Flujo (install.ps1)¶
npm (predeterminado): instalación global con npm usando el -Tag seleccionado
- Método git: clonar/actualizar el repositorio, instalar/compilar con pnpm e instalar el wrapper en %USERPROFILE%\.local\bin\openclaw.cmd
openclaw doctor --non-interactive en actualizaciones e instalaciones por git (mejor esfuerzo).
Ejemplos (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 | Descripción |
|---|---|
-InstallMethod npm\\|git |
Método de instalación (predeterminado: npm) |
-Tag <tag> |
Dist-tag de npm (predeterminado: latest) |
-GitDir <path> |
Directorio de checkout (predeterminado: %USERPROFILE%\openclaw) |
-NoOnboard |
Omitir onboarding |
-NoGitUpdate |
Omitir git pull |
-DryRun |
Imprimir solo acciones |
| Variable | Descripción |
|---|---|
OPENCLAW_INSTALL_METHOD=git\\|npm |
Método de instalación |
OPENCLAW_GIT_DIR=<path> |
Directorio de checkout |
OPENCLAW_NO_ONBOARD=1 |
Omitir onboarding |
OPENCLAW_GIT_UPDATE=0 |
Deshabilitar git pull |
OPENCLAW_DRY_RUN=1 |
Modo de ejecución seca |
-InstallMethod git y Git falta, el script finaliza e imprime el enlace de Git para Windows.
CI y automatización¶
Use flags/variables de entorno no interactivos para ejecuciones predecibles.
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
Solución de problemas¶
git. Para instalaciones npm, Git aún se comprueba/instala para evitar fallos spawn git ENOENT cuando las dependencias usan URLs de git.
install.sh puede cambiar el prefijo a ~/.npm-global y agregar exportaciones de PATH a archivos rc del shell (cuando esos archivos existen).
SHARP_IGNORE_GLOBAL_LIBVIPS=1 para evitar que sharp compile contra libvips del sistema. Para sobrescribirlo:
````
```bash
SHARP_IGNORE_GLOBAL_LIBVIPS=0 curl -fsSL --proto '=https' --tlsv1.2 https://openclaw.ai/install.sh | bash
```
````
npm config get prefix, agregue \bin, añada ese directorio al PATH del usuario y luego reabra PowerShell.