#8755: feat(install): add Arch Linux support to install.sh
scripts
stale
Cluster:
Node and macOS Enhancements
Add comprehensive install.sh script with support for Arch-based distributions (Arch Linux, Manjaro, EndeavourOS, Artix, ArcoLinux, CachyOS, etc.) using pacman package manager.
The script now detects Linux distributions by checking /etc/os-release and ID_LIKE fields, with fallback to package manager binary detection. For Arch-based systems, it installs nodejs and npm via pacman.
Also adds support for:
- openSUSE (zypper)
- Alpine Linux (apk)
- Void Linux (xbps-install)
- doas as alternative to sudo
Fixes #8051
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
This PR adds a new `scripts/install.sh` bash installer that:
- Detects OS (macOS vs Linux) and attempts to detect Linux distro via `/etc/os-release` (with `ID_LIKE` fallback) or package-manager binary presence.
- Installs Node.js 22+ using Homebrew on macOS, NodeSource on Debian/Fedora, pacman on Arch-based distros, zypper on openSUSE, apk on Alpine, and xbps-install on Void.
- Installs OpenClaw via `npm install -g openclaw@latest` (default) or from source via git+pnpm build, then optionally runs `openclaw onboard --install-daemon`.
Overall, the script is a useful cross-distro installer, but there are a few user-facing sharp edges (argument parsing with `set -u`), distro-specific package manager invocation details (pacman partial upgrade risk; Void xbps flags), and a couple of robustness/clarity issues in npm prefix detection and unused `--no-prompt` plumbing.
<h3>Confidence Score: 3/5</h3>
- This PR is reasonable to merge but has a couple of distro/CLI edge cases that can break installs for some users.
- The script is self-contained and the main flow is straightforward, but there are at least two concrete failure modes: missing option values causing `set -u` crashes, and likely incorrect xbps-install flags on Void. There’s also an Arch pacman invocation that can lead to partial-upgrade issues. These are fixable and mostly localized to the installer script.
- scripts/install.sh (argument parsing and distro-specific package manager commands)
<!-- greptile_other_comments_section -->
**Context used:**
- Context from `dashboard` - CLAUDE.md ([source](https://app.greptile.com/review/custom-context?memory=fd949e91-5c3a-4ab5-90a1-cbe184fd6ce8))
- Context from `dashboard` - AGENTS.md ([source](https://app.greptile.com/review/custom-context?memory=0d0c8278-ef8e-4d6c-ab21-f5527e322f13))
<!-- /greptile_comment -->
Most Similar PRs
#11951: Prepending Windows Node to PATH didn’t help
by tranhoangtu-it · 2026-02-08
73.5%
#22425: chore: make prepare git hooks setup cross-platform
by OldFineDev · 2026-02-21
72.0%
#3973: fix: enhance npm package integrity checks and include critical files
by YeSuX · 2026-01-29
71.8%
#6064: fix(daemon): prefer bundled node from install-cli.sh over system node
by joyshmitz · 2026-02-01
71.6%
#8600: fix(update): add --ignore-scripts to prevent supply chain attacks
by yubrew · 2026-02-04
71.3%
#12804: fix(daemon): use wrapper script for pnpm global installs in service...
by odinho · 2026-02-09
70.7%
#7938: fix(agents): install node skills with --prefix CONFIG_DIR for non-r...
by logozorro · 2026-02-03
70.4%
#3006: fix(scripts): use local pnpm binary in run-node.mjs if global is mi...
by elliotsecops · 2026-01-27
70.1%
#18493: making pnpm build:ui and pnpm build to work on windows
by darkpowerxo · 2026-02-16
69.7%
#18676: feat: add patch-ui.sh
by jasonkneen · 2026-02-16
69.7%