refactor: normalize cli command hints
This commit is contained in:
@@ -7,40 +7,43 @@ read_when:
|
||||
|
||||
# Install
|
||||
|
||||
Runtime baseline: **Node >=22**.
|
||||
Use the installer unless you have a reason not to. It sets up the CLI and runs onboarding.
|
||||
|
||||
If the installer says it succeeded but you later see `clawdbot: command not found`, it’s usually a Node/npm PATH issue (global npm bin dir not on PATH). See the section below.
|
||||
|
||||
## Node.js + npm (PATH sanity)
|
||||
|
||||
Quick diagnosis:
|
||||
|
||||
```bash
|
||||
node -v
|
||||
npm -v
|
||||
npm bin -g
|
||||
echo "$PATH"
|
||||
```
|
||||
|
||||
If the output of `npm bin -g` is **not** present inside `echo "$PATH"`, your shell can’t find global npm binaries (including `clawdbot`).
|
||||
|
||||
Fix: add it to your shell startup file (zsh: `~/.zshrc`, bash: `~/.bashrc`):
|
||||
|
||||
```bash
|
||||
export PATH="/path/from/npm/bin/-g:$PATH"
|
||||
```
|
||||
|
||||
Then open a new terminal (or `rehash` in zsh / `hash -r` in bash).
|
||||
|
||||
## Recommended (installer script)
|
||||
## Quick install (recommended)
|
||||
|
||||
```bash
|
||||
curl -fsSL https://clawd.bot/install.sh | bash
|
||||
```
|
||||
|
||||
This installs the `clawdbot` CLI globally via npm and then starts onboarding.
|
||||
Windows (PowerShell):
|
||||
|
||||
See installer flags:
|
||||
```powershell
|
||||
iwr -useb https://clawd.bot/install.ps1 | iex
|
||||
```
|
||||
|
||||
Next step (if you skipped onboarding):
|
||||
|
||||
```bash
|
||||
clawdbot onboard --install-daemon
|
||||
```
|
||||
|
||||
## System requirements
|
||||
|
||||
- **Node >=22**
|
||||
- macOS, Linux, or Windows via WSL2
|
||||
- `pnpm` only if you build from source
|
||||
|
||||
## Choose your install path
|
||||
|
||||
### 1) Installer script (recommended)
|
||||
|
||||
Installs `clawdbot` globally via npm and runs onboarding.
|
||||
|
||||
```bash
|
||||
curl -fsSL https://clawd.bot/install.sh | bash
|
||||
```
|
||||
|
||||
Installer flags:
|
||||
|
||||
```bash
|
||||
curl -fsSL https://clawd.bot/install.sh | bash -s -- --help
|
||||
@@ -54,7 +57,60 @@ Non-interactive (skip onboarding):
|
||||
curl -fsSL https://clawd.bot/install.sh | bash -s -- --no-onboard
|
||||
```
|
||||
|
||||
## Install method: npm vs git
|
||||
### 2) Global install (manual)
|
||||
|
||||
If you already have Node:
|
||||
|
||||
```bash
|
||||
npm install -g clawdbot@latest
|
||||
```
|
||||
|
||||
If you have libvips installed globally (common on macOS via Homebrew) and `sharp` fails to install, force prebuilt binaries:
|
||||
|
||||
```bash
|
||||
SHARP_IGNORE_GLOBAL_LIBVIPS=1 npm install -g clawdbot@latest
|
||||
```
|
||||
|
||||
Or:
|
||||
|
||||
```bash
|
||||
pnpm add -g clawdbot@latest
|
||||
```
|
||||
|
||||
Then:
|
||||
|
||||
```bash
|
||||
clawdbot onboard --install-daemon
|
||||
```
|
||||
|
||||
### 3) From source (contributors/dev)
|
||||
|
||||
```bash
|
||||
git clone https://github.com/clawdbot/clawdbot.git
|
||||
cd clawdbot
|
||||
pnpm install
|
||||
pnpm ui:build # auto-installs UI deps on first run
|
||||
pnpm build
|
||||
clawdbot onboard --install-daemon
|
||||
```
|
||||
|
||||
Tip: if you don’t have a global install yet, run repo commands via `pnpm clawdbot ...`.
|
||||
|
||||
### 4) Other install options
|
||||
|
||||
- Docker: [Docker](/install/docker)
|
||||
- Nix: [Nix](/install/nix)
|
||||
- Ansible: [Ansible](/install/ansible)
|
||||
- Bun (CLI only): [Bun](/install/bun)
|
||||
|
||||
## After install
|
||||
|
||||
- Run onboarding: `clawdbot onboard --install-daemon`
|
||||
- Quick check: `clawdbot doctor`
|
||||
- Check gateway health: `clawdbot status` + `clawdbot health`
|
||||
- Open the dashboard: `clawdbot dashboard`
|
||||
|
||||
## Install method: npm vs git (installer)
|
||||
|
||||
The installer supports two methods:
|
||||
|
||||
@@ -92,28 +148,28 @@ Equivalent env vars (useful for automation):
|
||||
- `CLAWDBOT_NO_ONBOARD=1`
|
||||
- `SHARP_IGNORE_GLOBAL_LIBVIPS=0|1` (default: `1`; avoids `sharp` building against system libvips)
|
||||
|
||||
## Global install (manual)
|
||||
## Troubleshooting: `clawdbot` not found (PATH)
|
||||
|
||||
If you already have Node:
|
||||
Quick diagnosis:
|
||||
|
||||
```bash
|
||||
npm install -g clawdbot@latest
|
||||
node -v
|
||||
npm -v
|
||||
npm bin -g
|
||||
echo "$PATH"
|
||||
```
|
||||
|
||||
If you have libvips installed globally (common on macOS via Homebrew) and `sharp` fails to install, force prebuilt binaries:
|
||||
If the output of `npm bin -g` is **not** present inside `echo "$PATH"`, your shell can’t find global npm binaries (including `clawdbot`).
|
||||
|
||||
Fix: add it to your shell startup file (zsh: `~/.zshrc`, bash: `~/.bashrc`):
|
||||
|
||||
```bash
|
||||
SHARP_IGNORE_GLOBAL_LIBVIPS=1 npm install -g clawdbot@latest
|
||||
export PATH="/path/from/npm/bin/-g:$PATH"
|
||||
```
|
||||
|
||||
Or:
|
||||
Then open a new terminal (or `rehash` in zsh / `hash -r` in bash).
|
||||
|
||||
```bash
|
||||
pnpm add -g clawdbot@latest
|
||||
```
|
||||
## Update / uninstall
|
||||
|
||||
Then:
|
||||
|
||||
```bash
|
||||
clawdbot onboard --install-daemon
|
||||
```
|
||||
- Updates: [Updating](/install/updating)
|
||||
- Uninstall: [Uninstall](/install/uninstall)
|
||||
|
||||
Reference in New Issue
Block a user