Skip to content

Commit 93d8a86

Browse files
committed
docs: refresh local installer references
1 parent 790a240 commit 93d8a86

2 files changed

Lines changed: 57 additions & 26 deletions

File tree

docs/install/index.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,18 @@ For all flags and CI/automation options, see [Installer internals](/install/inst
5151

5252
## Alternative install methods
5353

54+
### Local prefix installer (`install-cli.sh`)
55+
56+
Use this when you want OpenClaw and Node kept under a local prefix such as
57+
`~/.openclaw`, without depending on a system-wide Node install:
58+
59+
```bash
60+
curl -fsSL https://openclaw.ai/install-cli.sh | bash
61+
```
62+
63+
It supports npm installs by default, plus git-checkout installs under the same
64+
prefix flow. Full reference: [Installer internals](/install/installer#install-clish).
65+
5466
### npm or pnpm
5567

5668
If you already manage Node yourself:

docs/install/installer.md

Lines changed: 45 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ title: "Installer Internals"
1111

1212
OpenClaw ships three installer scripts, served from `openclaw.ai`.
1313

14-
| Script | Platform | What it does |
15-
| ---------------------------------- | -------------------- | -------------------------------------------------------------------------------------------- |
16-
| [`install.sh`](#installsh) | macOS / Linux / WSL | Installs Node if needed, installs OpenClaw via npm (default) or git, and can run onboarding. |
17-
| [`install-cli.sh`](#install-clish) | macOS / Linux / WSL | Installs Node + OpenClaw into a local prefix (`~/.openclaw`). No root required. |
18-
| [`install.ps1`](#installps1) | Windows (PowerShell) | Installs Node if needed, installs OpenClaw via npm (default) or git, and can run onboarding. |
14+
| Script | Platform | What it does |
15+
| ---------------------------------- | -------------------- | -------------------------------------------------------------------------------------------------------------- |
16+
| [`install.sh`](#installsh) | macOS / Linux / WSL | Installs Node if needed, installs OpenClaw via npm (default) or git, and can run onboarding. |
17+
| [`install-cli.sh`](#install-clish) | macOS / Linux / WSL | Installs Node + OpenClaw into a local prefix (`~/.openclaw`) with npm or git checkout modes. No root required. |
18+
| [`install.ps1`](#installps1) | Windows (PowerShell) | Installs Node if needed, installs OpenClaw via npm (default) or git, and can run onboarding. |
1919

2020
## Quick commands
2121

@@ -177,7 +177,9 @@ The script exits with code `2` for invalid method selection or invalid `--instal
177177
## install-cli.sh
178178

179179
<Info>
180-
Designed for environments where you want everything under a local prefix (default `~/.openclaw`) and no system Node dependency.
180+
Designed for environments where you want everything under a local prefix
181+
(default `~/.openclaw`) and no system Node dependency. Supports npm installs
182+
by default, plus git-checkout installs under the same prefix flow.
181183
</Info>
182184

183185
### Flow (install-cli.sh)
@@ -190,7 +192,13 @@ Designed for environments where you want everything under a local prefix (defaul
190192
If Git is missing, attempts install via apt/dnf/yum on Linux or Homebrew on macOS.
191193
</Step>
192194
<Step title="Install OpenClaw under prefix">
193-
Installs with npm using `--prefix <prefix>`, then writes wrapper to `<prefix>/bin/openclaw`.
195+
- `npm` method (default): installs under the prefix with npm, then writes wrapper to `<prefix>/bin/openclaw`
196+
- `git` method: clones/updates a checkout (default `~/openclaw`) and still writes the wrapper to `<prefix>/bin/openclaw`
197+
</Step>
198+
<Step title="Refresh loaded gateway service">
199+
If a gateway service is already loaded from that same prefix, the script runs
200+
`openclaw gateway install --force`, then `openclaw gateway restart`, and
201+
probes gateway health best-effort.
194202
</Step>
195203
</Steps>
196204

@@ -207,6 +215,11 @@ Designed for environments where you want everything under a local prefix (defaul
207215
curl -fsSL --proto '=https' --tlsv1.2 https://openclaw.ai/install-cli.sh | bash -s -- --prefix /opt/openclaw --version latest
208216
```
209217
</Tab>
218+
<Tab title="Git install">
219+
```bash
220+
curl -fsSL --proto '=https' --tlsv1.2 https://openclaw.ai/install-cli.sh | bash -s -- --install-method git --git-dir ~/openclaw
221+
```
222+
</Tab>
210223
<Tab title="Automation JSON output">
211224
```bash
212225
curl -fsSL --proto '=https' --tlsv1.2 https://openclaw.ai/install-cli.sh | bash -s -- --json --prefix /opt/openclaw
@@ -222,30 +235,36 @@ Designed for environments where you want everything under a local prefix (defaul
222235
<AccordionGroup>
223236
<Accordion title="Flags reference">
224237

225-
| Flag | Description |
226-
| ---------------------- | ------------------------------------------------------------------------------- |
227-
| `--prefix <path>` | Install prefix (default: `~/.openclaw`) |
228-
| `--version <ver>` | OpenClaw version or dist-tag (default: `latest`) |
229-
| `--node-version <ver>` | Node version (default: `22.22.0`) |
230-
| `--json` | Emit NDJSON events |
231-
| `--onboard` | Run `openclaw onboard` after install |
232-
| `--no-onboard` | Skip onboarding (default) |
233-
| `--set-npm-prefix` | On Linux, force npm prefix to `~/.npm-global` if current prefix is not writable |
234-
| `--help` | Show usage (`-h`) |
238+
| Flag | Description |
239+
| --------------------------- | ------------------------------------------------------------------------------- |
240+
| `--prefix <path>` | Install prefix (default: `~/.openclaw`) |
241+
| `--install-method npm\|git` | Choose install method (default: `npm`). Alias: `--method` |
242+
| `--npm` | Shortcut for npm method |
243+
| `--git`, `--github` | Shortcut for git method |
244+
| `--git-dir <path>` | Git checkout directory (default: `~/openclaw`). Alias: `--dir` |
245+
| `--version <ver>` | OpenClaw version or dist-tag (default: `latest`) |
246+
| `--node-version <ver>` | Node version (default: `22.22.0`) |
247+
| `--json` | Emit NDJSON events |
248+
| `--onboard` | Run `openclaw onboard` after install |
249+
| `--no-onboard` | Skip onboarding (default) |
250+
| `--set-npm-prefix` | On Linux, force npm prefix to `~/.npm-global` if current prefix is not writable |
251+
| `--help` | Show usage (`-h`) |
235252

236253
</Accordion>
237254

238255
<Accordion title="Environment variables reference">
239256

240-
| Variable | Description |
241-
| ------------------------------------------- | --------------------------------------------------------------------------------- |
242-
| `OPENCLAW_PREFIX=<path>` | Install prefix |
243-
| `OPENCLAW_VERSION=<ver>` | OpenClaw version or dist-tag |
244-
| `OPENCLAW_NODE_VERSION=<ver>` | Node version |
245-
| `OPENCLAW_NO_ONBOARD=1` | Skip onboarding |
246-
| `OPENCLAW_NPM_LOGLEVEL=error\|warn\|notice` | npm log level |
247-
| `OPENCLAW_GIT_DIR=<path>` | Legacy cleanup lookup path (used when removing old `Peekaboo` submodule checkout) |
248-
| `SHARP_IGNORE_GLOBAL_LIBVIPS=0\|1` | Control sharp/libvips behavior (default: `1`) |
257+
| Variable | Description |
258+
| ------------------------------------------- | --------------------------------------------- |
259+
| `OPENCLAW_PREFIX=<path>` | Install prefix |
260+
| `OPENCLAW_INSTALL_METHOD=git\|npm` | Install method |
261+
| `OPENCLAW_VERSION=<ver>` | OpenClaw version or dist-tag |
262+
| `OPENCLAW_NODE_VERSION=<ver>` | Node version |
263+
| `OPENCLAW_GIT_DIR=<path>` | Git checkout directory for git installs |
264+
| `OPENCLAW_GIT_UPDATE=0\|1` | Toggle git updates for existing checkouts |
265+
| `OPENCLAW_NO_ONBOARD=1` | Skip onboarding |
266+
| `OPENCLAW_NPM_LOGLEVEL=error\|warn\|notice` | npm log level |
267+
| `SHARP_IGNORE_GLOBAL_LIBVIPS=0\|1` | Control sharp/libvips behavior (default: `1`) |
249268

250269
</Accordion>
251270
</AccordionGroup>

0 commit comments

Comments
 (0)