Installer scripts
Moltbot ships a few installers (from molt.bot):
- install.sh — Main one. Global npm install by default; can also use a git checkout.
- install-cli.sh — No root needed. Puts CLI + its own Node under a prefix (e.g.
~/.clawdbot). - install.ps1 — Windows PowerShell. npm by default; optional git install.
See what they support:
curl -fsSL https://molt.bot/install.sh | bash -s -- --helpWindows:
& ([scriptblock]::Create((iwr -useb https://molt.bot/install.ps1))) -?If the script finishes but moltbot isn’t in your PATH, it’s almost always a Node/npm PATH thing. Install troubleshooting.
install.sh (recommended)
What it does:
- Detects OS (macOS / Linux / WSL).
- Makes sure you have Node 22+ (Homebrew on macOS, NodeSource on Linux).
- Installs via npm (default) or git (clone + build from GitHub).
- On Linux: if global npm would hit EACCES, it switches prefix to
~/.npm-globaland adds it to PATH in your shell rc. - On upgrade: runs
moltbot doctor --non-interactive(best effort). - For git installs: same doctor run after install/update.
- Sets
SHARP_IGNORE_GLOBAL_LIBVIPS=1by default sosharpdoesn’t fight your system libvips.
If you want sharp to use system libvips (or you’re debugging), run:
SHARP_IGNORE_GLOBAL_LIBVIPS=0 curl -fsSL https://molt.bot/install.sh | bash“Git install” prompt
If you run the installer inside an existing Moltbot repo (it checks for package.json + pnpm-workspace.yaml), it asks:
- Use this checkout (update and go), or
- Switch to global npm install.
In non-interactive mode (no TTY or --no-prompt), you must pass --install-method git or npm (or set CLAWDBOT_INSTALL_METHOD), or the script exits with code 2.
Why Git?
For --install-method git, Git is required (clone/pull). For npm installs it’s usually not, but some deps still pull via git, so the installer expects Git to be there to avoid “spawn git ENOENT” on fresh boxes.
Why npm hits EACCES on fresh Linux
On some Linux setups, npm’s global prefix is root-owned. Then npm install -g fails with EACCES. install.sh works around it by switching prefix to ~/.npm-global and wiring that into your shell’s PATH (e.g. ~/.bashrc / ~/.zshrc).
install-cli.sh (no root)
Puts moltbot in a prefix (default ~/.clawdbot) and installs a dedicated Node there. Use it when you don’t want to touch system Node/npm.
curl -fsSL https://molt.bot/install-cli.sh | bash -s -- --helpinstall.ps1 (Windows)
- Ensures Node 22+ (winget / Chocolatey / Scoop or manual).
- Installs via npm (default) or git (clone + build).
- Runs
moltbot doctor --non-interactiveon upgrade and after git installs.
Examples:
iwr -useb https://molt.bot/install.ps1 | iex
iwr -useb https://molt.bot/install.ps1 | iex -InstallMethod git
iwr -useb https://molt.bot/install.ps1 | iex -InstallMethod git -GitDir "C:\moltbot"Env: CLAWDBOT_INSTALL_METHOD, CLAWDBOT_GIT_DIR. If you pick git and Git isn’t installed, it prints the Git for Windows link and exits.
Common Windows issues:
- spawn git ENOENT — Install Git for Windows, reopen PowerShell, rerun.
- “moltbot” is not recognized — npm’s global bin folder isn’t on PATH. Often
%AppData%\npm. Runnpm config get prefixand add that path (and\bin) to PATH, then reopen PowerShell.