npm package: @nhiensoft/openclaw-setup
Description: One-command OpenClaw installer — works on macOS, Linux, WSL, and Windows
Author: nhiensoft
Latest version: 1.0.1

# @nhiensoft/openclaw-setup

One-command interactive installer for [OpenClaw](https://docs.openclaw.ai) — works on **macOS**, **Linux**, **WSL**, and **Windows**.

```bash
npx @nhiensoft/openclaw-setup
```

## What it does

The installer walks you through the complete OpenClaw setup in a single command:

1. **Detects your OS** — macOS (Intel & Apple Silicon), Linux (Debian/Ubuntu, Fedora/RHEL, Arch, Alpine), WSL2, Windows
2. **Installs Node.js** (>= v22) if missing — via fnm, Homebrew, winget, nvm-windows, or system package manager
3. **Installs Homebrew** (macOS only) if missing
4. **Installs OpenClaw** — downloads and runs the official installer
5. **Configures your AI provider** — choose ClipProxy (pre-configured) or bring your own OpenAI-compatible API
6. **Selects your default model** — Claude, Gemini, GPT, or custom
7. **Sets up Telegram bot** (optional) — walk-through for BotFather token + pairing
8. **Installs & starts the daemon** — system service + gateway
9. **Writes config** to `~/.openclaw/openclaw.json`

## Installation

### Run directly (no install needed)

```bash
npx @nhiensoft/openclaw-setup
```

### Install globally

```bash
npm install -g @nhiensoft/openclaw-setup
openclaw-setup
```

### Run without npm (alternative)

**macOS / Linux / WSL:**
```bash
curl -fsSL https://raw.githubusercontent.com/nhiensoft/openclaw-setup/main/scripts/install.sh | bash
```

**Windows (PowerShell):**
```powershell
Set-ExecutionPolicy Bypass -Scope Process -Force
iwr -useb https://raw.githubusercontent.com/nhiensoft/openclaw-setup/main/scripts/install.ps1 | iex
```

## Supported platforms

| Platform | Shell | Node installer fallback |
|---|---|---|
| macOS (Apple Silicon) | bash | fnm > Homebrew > manual |
| macOS (Intel) | bash | fnm > Homebrew > manual |
| Ubuntu / Debian | bash | fnm > NodeSource (apt) |
| Fedora / RHEL | bash | fnm > NodeSource (dnf/yum) |
| Arch Linux | bash | fnm > pacman |
| Alpine Linux | bash | fnm > apk |
| WSL2 | bash | fnm > NodeSource |
| Windows 10/11 | PowerShell 5.1+ / pwsh 7+ | winget > nvm-windows |

## Available models (ClipProxy)

| Model | ID |
|---|---|
| Claude Sonnet 4.6 | `claude-sonnet-4-6` |
| Claude Opus 4.6 Thinking | `claude-opus-4-6-thinking` |
| Gemini 2.5 Pro | `gemini-2.5-pro` |
| Gemini 2.5 Flash | `gemini-2.5-flash` |
| Gemini 3 Flash | `gemini-3-flash` |
| Gemini 3 Pro High | `gemini-3-pro-high` |
| Gemini 3.1 Pro High | `gemini-3.1-pro-high` |
| GPT OSS 120B Medium | `gpt-oss-120b-medium` |

## Post-install commands

```bash
openclaw gateway          # Start the gateway (port 18789)
openclaw gateway status   # Check if running
openclaw dashboard        # Open control UI in browser
openclaw onboard          # Reconfigure provider/models
```

## Telegram setup

After installation, if you chose to configure Telegram:

1. Open Telegram and message your bot
2. List pairing requests: `openclaw pairing list telegram`
3. Approve: `openclaw pairing approve telegram <CODE>`

Pairing codes expire after 1 hour.

## Config location

| OS | Path |
|---|---|
| macOS / Linux | `~/.openclaw/openclaw.json` |
| Windows | `%USERPROFILE%\.openclaw\openclaw.json` |

## Requirements

- **Node.js >= 18** (to run this installer; OpenClaw itself needs >= 22)
- **bash** (macOS/Linux) or **PowerShell 5.1+** (Windows)
- Internet connection

## License

MIT