From Zero to AI Assistant in 5 Minutes

Choose your platform and follow along. You'll be chatting with your AI in no time.

Installing on macOS

The fastest way to get started. Requires Node.js 18+.

1

Install OpenClaw

npm install -g openclaw
2

Run the Setup Wizard

This will walk you through API key configuration and basic settings.

openclaw init
3

Start the Gateway

The gateway is OpenClaw's background service that handles all connections.

openclaw gateway start
4

Say Hello!

openclaw chat "Hello! What can you do?"

Get Your API Key

OpenClaw needs an API key from your preferred AI provider.

🟢 OpenAI (GPT-4)

  1. Go to platform.openai.com
  2. Create a new API key
  3. Copy and paste during openclaw init

🟣 Anthropic (Claude)

  1. Go to console.anthropic.com
  2. Navigate to API Keys
  3. Create and copy your key

🔵 OpenRouter (Multi-model)

  1. Go to openrouter.ai
  2. Create an account and add credits
  3. Copy your API key

Use any model from any provider with one key!

Troubleshooting

Common issues and how to fix them.

Command not found: openclaw

Make sure npm's global bin directory is in your PATH. Try:

npm config get prefix

Add the returned path + /bin to your shell's PATH variable.

Gateway won't start

Check if the port is already in use. The gateway runs on port 3000 by default.

lsof -i :3000  # macOS/Linux
netstat -ano | findstr :3000  # Windows

You can also try restarting: openclaw gateway restart

API key not working

Verify your API key is correctly set:

openclaw config show

Make sure there are no extra spaces. You can reset it with openclaw init.

WhatsApp QR code not appearing

The WhatsApp QR code is shown in the terminal. Make sure you run the command in a terminal that supports QR display. If issues persist, see the official WhatsApp docs.

🎉 You're All Set!

Now that OpenClaw is running, here's what to do next: