OpenClaw macOS Setup Guide (Standard Account)
The Problem
Standard macOS accounts do not have "Write" access to /opt/homebrew/bin or /usr/local/bin. When using npm install -g, the installer may claim success but fail to actually place the executable file in a folder your system can see.
The Solution: Local Prefix Installation
Installing to your user's home directory avoids the need for an Admin password and keeps the software isolated to your profile.
1. Perform a Local User Install
Run this command to force npm to install into your personal hidden folder:
npm install -g openclaw --prefix=$HOME/.local
2. Configure your Shell Path
You must tell your terminal to look in that specific local folder before checking the system folders.
Open your profile: vi ~/.zshrc
Add this line to the very bottom:
export PATH="$HOME/.local/bin:$PATH"
After saving you’ll need to refresh the shell:
source ~/.zshrc
Use these commands to verify the setup:
| Command | Purpose | Successful Result |
|---|---|---|
| echo $PATH | Checks your search list | Should start with /Users/yourname/.local/bin:... |
| which openclaw | Locates the executable | /Users/yourname/.local/bin/openclaw |
| rehash | Refreshes command cache | No output (clears the "not found" memory) |

