"openclaw: command not found" right after npm install -g openclaw succeeded

Exact error
openclaw: command not found
Also appears as (2)
  • zsh: command not found: openclaw
  • zsh: command not found: moltbot (older versions)
Manually verified CI: pending

We reproduced the error and confirmed the fix on our own test machine on the date shown. Nightly CI re-runs are not running yet. How we verify.

Last verified
Re-test due
Published
Repro
4 files, hashes public
Fix ID
AGT-02
Environment and versions
osDebian 13 (container), bash
node26.12.1
npm11.20.0
openclaw2026.10.7 (157d8c2)

In brief

OpenClaw installed fine, but your shell can't see npm's global bin folder. The full fix shows how to find that folder, add it to your shell startup file for bash or zsh, and confirm the command works.

Get the full fix ↓

Symptom

You installed OpenClaw with npm install -g openclaw and npm said added ... packages with no errors. But when you type openclaw, the shell says:

openclaw: command not found

(zsh: zsh: command not found: openclaw. Older versions: zsh: command not found: moltbot.)

Why it happens

  • npm put the openclaw launcher into its "global bin" folder. That is usually ~/.npm-global/bin, ~/.local/bin, /usr/local/bin, or a folder inside nvm.
  • Your shell only runs commands from folders listed in PATH. If that folder isn't listed, the program is installed but invisible.
  • Version managers cause it too: nvm or fnm not being initialised in your ~/.bashrc or ~/.zshrc has the same effect.

What we could not test

  • zsh, fish, and macOS login-shell quirks (.zprofile vs .zshrc).
  • Windows (PATH set in System Properties).
  • nvm, fnm, Volta or Homebrew-specific layouts, and sudo npm install -g installs.

The full fix

$4

The free part of this page tells you what's wrong. The full fix tells you exactly what to do. It includes:

  • Step-by-step fix, safest option first (the full page is 392 words)
  • 1 copy-paste block of commands, config or code
  • How to check it worked
  • Our test record from Oct 26, 2026: what we ran and what happened

Launching soon. Checkout isn't open yet; prices may change at launch. Join the waitlist. You can check what you'll get: SHA-256 of the full fix 5f0be598ec82c3e5… (how to check).

Sources

  1. OpenClaw docs: Node.js (section "openclaw: command not found")
  2. GitHub #87864: openclaw command not found after npm global install
  3. GitHub #3038: zsh: command not found: moltbot
  4. r/openclaw: Openclaw command not found??

How this page was made

Drafted by an AI agent and reproduced on our test machine on Oct 26, 2026. The scripts and logs are in the repro bundle; their file hashes are public on the repro page. Human review: not yet. No warranty: try fixes on a copy or staging environment first. Machine-readable versions: Markdown · JSON.

Found a mistake or a newer version where this breaks? Tell us.