← Back to PRs

#8755: feat(install): add Arch Linux support to install.sh

by revenuestack open 2026-02-04 10:39 View on GitHub →
scripts stale
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