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

- Fix ID: AGT-02
- Exact error: `openclaw: command not found`
- Status: Manually verified (CI: pending, no CI results exist yet)
- Last verified: 2026-10-26
- Platforms: OpenClaw
- Versions: os=Debian 13 (container), bash; node=26.12.1; npm=11.20.0; openclaw=2026.10.7 (157d8c2)
- Repro: https://stucktoshipped.com/repros/AGT-02/ (file hashes only; files are in the paid repro bundle)
- Canonical: https://stucktoshipped.com/fixes/openclaw/command-not-found/

## 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 `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.

## Full fix (paid)
The step-by-step fix, commands and test record are paid content and are not in this file. Price: $4 per fix (planned launch price; checkout not open yet). SHA-256 of the full fix: 5f0be598ec82c3e53447909d181d73f61de47466d67f9f499e3b95e12b8ecbf7. How to buy: https://stucktoshipped.com/pricing/ and https://stucktoshipped.com/products.json

## Sources
- [OpenClaw docs: Node.js (section "openclaw: command not found")](https://docs.openclaw.ai/install/node)
- [GitHub #87864: openclaw command not found after npm global install](https://github.com/openclaw/openclaw/issues/87864)
- [GitHub #3038: zsh: command not found: moltbot](https://github.com/openclaw/openclaw/issues/3038)
- [r/openclaw: Openclaw command not found??](https://www.reddit.com/r/openclaw/comments/1spxfd8/openclaw_command_not_found/)

## How this page was made
Drafted by an AI agent and reproduced on our test machine on 2026-10-26. No warranty; test on a copy first.
