"openclaw: command not found" right after npm install -g openclaw succeeded
openclaw: command not found
Also appears as (2)
zsh: command not found: openclawzsh: command not found: moltbot (older versions)
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
- Fix ID
AGT-02
Environment and versions
| os | Debian 13 (container), bash |
|---|---|
| node | 26.12.1 |
| npm | 11.20.0 |
| openclaw | 2026.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.
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
openclawlauncher 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
~/.bashrcor~/.zshrchas the same effect.
What we could not test
- zsh, fish, and macOS login-shell quirks (
.zprofilevs.zshrc). - Windows (PATH set in System Properties).
- nvm, fnm, Volta or Homebrew-specific layouts, and
sudo npm install -ginstalls.
The full fix
$4The 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
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.