God Mode:
Claude Code + OpenClaw
The Mac Mini M4 AI Command Center Setup Guide
From zero to autonomous AI agent in one afternoon
What Is Claude Code?
The AI agent that lives in your terminal and actually does things
Not a chat box. An agent.
Claude Code is Anthropic's official CLI tool. Install it, open your terminal, type claude, and you now have an AI that can read, write, edit, and run things on your actual computer.
It DOES things
Ask it to fix a bug — it reads the file, writes the fix, runs the tests, and asks if you want a PR. Ask it to document your codebase — it reads every file and writes the docs. For real.
Key Capabilities
Install It Now
npm install -g @anthropic-ai/claude-code
claude # Launch Claude CodeInteractive Demo — See It In Action
Click a task to try it:
Key Concepts
Newbie survival guide — understand these before you start
Permission Modes
Claude Code asks before doing anything dangerous. "I want to run this command — approve?" You can set it to always ask, auto-approve safe things, or full auto. Start with "always ask" until you trust it.
MCP Servers — Claude's Superpowers
MCP (Model Context Protocol) lets Claude Code connect to external tools: Notion, GitHub, Google Calendar, databases, Slack, and more. You install an MCP server and Claude can now read/write to that system.
Hooks — Automated Actions
Hooks run shell commands automatically before or after Claude does things. Example: "After Claude edits any file, run the linter." Set-and-forget automation.
CLAUDE.md — Project Memory
Drop a file called CLAUDE.md in any project folder. Claude reads it every session. Put your coding standards, project description, context. This is how it remembers who you are and what you're building.
# My Project
This is a Shopify store backend. Stack: Node.js, PostgreSQL.
Never use var. Always write tests. PR naming: feat/ticket-nameSlash Commands
/helpShow all available commands/clearClear conversation (saves tokens)/compactSummarize context to save memory/costSee how much API this session cost/memoryView what Claude remembers about youChat Claude vs Claude Code
- Explains concepts
- Drafts text and documents
- Answers questions
- Can't touch your files
- Lives in the browser
- Fixes actual bugs in your code
- Reads & writes real files
- Runs terminal commands
- Manages your whole project
- Lives in your machine
What Is OpenClaw?
The always-on AI agent runtime that runs on your Mac Mini 24/7
A local AI agent that never sleeps
OpenClaw runs as a background service on your Mac Mini. It connects Claude to Discord, GitHub, your files, and the internet. You DM your agent and it works while you're doing other things.
Claude Code is its coding brain
When you tell OpenClaw to write code, it hands that task to Claude Code. Claude Code reads your repos, writes the fix, runs tests, and opens a PR — triggered by a single Discord message.
How It All Connects
What Your Agent Can Do
Mac Mini M4 Setup
Your always-on AI command center — hardware and accounts
Why Mac Mini M4?
Pre-Setup Checklist — Click to Check Off
- Mac Mini M4 purchased, unboxed, and connected to wired Ethernet
- External SSD attached for Time Machine backups (Samsung T7 ~$80)
- Anthropic API account created at console.anthropic.com — add $10–20 credits
- Discord account created + developer app set up at discord.com/developers
- GitHub account created — dedicated "agent" account, separate from yours
- Remote Login (SSH) enabled: System Settings → General → Sharing → Remote Login
- Energy set to Never Sleep: System Settings → Energy → Prevent automatic sleeping
Required Accounts
OpenClaw Installation
Copy, paste, run. It really is this simple.
Install Homebrew + Node 24
⚠️ Node 24 is required. Not 18. Not 20. Node 24.
# Install Homebrew (macOS package manager)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Install Node 24
brew install node@24 && brew link node@24
echo 'export PATH="/opt/homebrew/opt/node@24/bin:$PATH"' >> ~/.zshrc && source ~/.zshrc
# Verify
node --version # Should show v24.xInstall OpenClaw
npm install -g openclaw@latest
openclaw --version
# Run the onboarding wizard (creates your config + installs daemon)
openclaw onboard --install-daemon
# Start the gateway
openclaw gateway --port 18789Configure Claude API Key
Get your API key from console.anthropic.com → API Keys → Create new key.
# Add to ~/.zshrc (NEVER hardcode keys in files)
export ANTHROPIC_API_KEY="sk-ant-api03-YOUR-KEY-HERE"
source ~/.zshrc
# Verify it loaded
echo $ANTHROPIC_API_KEYDiscord Bot Setup
- Go to discord.com/developers → New Application → name it "OpenClaw Agent"
- Click "Bot" in sidebar → Enable: SERVER MEMBERS INTENT, MESSAGE CONTENT INTENT, PRESENCE INTENT
- ⚠️ MESSAGE CONTENT INTENT must be ON or the bot silently ignores all your messages
- Copy your bot token and save it
export DISCORD_BOT_TOKEN="YOUR_BOT_TOKEN_HERE"
openclaw config set discord.botToken "$DISCORD_BOT_TOKEN"
openclaw discord pair
# Approve the DM pairing code, then:
openclaw guild create --name "My Agent Workspace"GitHub Setup
brew install gh
gh auth login # Follow the promptsDiscord Channels to Create
God Mode Activation
Connect Claude Code as OpenClaw's coding brain
Install the Coding Skill
# Install Claude Code (if not already done)
npm install -g @anthropic-ai/claude-code
# Install the coding-agent skill in OpenClaw
openclaw skills install coding-agent
# Verify
openclaw skills list | grep codingFull Config (~/.openclaw/openclaw.json)
{
"agentModel": "anthropic/claude-opus-4-6",
"agentName": "MyAgent",
"llm": {
"provider": "anthropic",
"apiKey": "${ANTHROPIC_API_KEY}"
},
"channels": {
"discord": {
"botToken": "${DISCORD_BOT_TOKEN}",
"requireMention": false,
"channels": {
"coding": "CHANNEL_ID_CODING",
"research": "CHANNEL_ID_RESEARCH",
"tasks": "CHANNEL_ID_TASKS"
}
}
},
"skills": ["coding-agent"],
"memory": { "enabled": true, "maxItems": 500 },
"logging": { "level": "info", "file": "~/Library/Logs/openclaw.log" }
}Pick the Right Model
claude-opus-4-6claude-sonnet-4-6claude-haiku-4-5God Mode Commands
openclaw task "Fix the login bug in auth.js"Claude Code reads your code, finds the bug, writes the fix, creates a PR — you just review and merge.
openclaw task "Fix issues #12, #15, #18 in parallel"Multiple Claude Code instances work simultaneously on separate branches. Massive speed boost.
openclaw skills run pr-review --repo myorg/myrepo --pr 42Automatically reviews pull requests, leaves inline comments, flags issues. Like having a senior dev on call.
openclaw task "Refactor the data pipeline" --notify-on-completeRuns overnight while you sleep. Pings your Discord when done. Wake up to a finished refactor.
The Trust Ladder
Don't skip this. Earn trust incrementally — it's for your own safety.
Your agent is powerful. That means if it's confused or misconfigured, it can do real damage. The Trust Ladder exists to catch mistakes before they become disasters. Follow it. Do not skip weeks.
Click each week to expand →
First Week Survival Kit
Practical habits that separate power users from frustrated ones
Front-Load Your Context on Day 1
In your very first conversation, tell your agent everything. Don't drip-feed it over weeks.
I'm [your name]. I work on [projects].
My communication style is [direct/detailed/casual].
My current main project is [X], the goal is [Y].
Tools I use: [list them].
Here's what I need help with most: [Z].Monthly State of the Union
Ask your agent "What do you know about me and my projects?" once a month. Correct any drift before it compounds. Agent memory can get stale — catch it early.
Use Consistent Project Names
The agent treats "vending machine business" and "VM project" as two completely different things in memory. Pick one name per project and always use it. Same with people's names.
Separate Channels by Context Type
Don't mix coding and personal tasks in the same channel. The agent blends context. Use #coding for code, #research for research, DMs for personal. Context doesn't bleed across channels.
Session Opener for Ongoing Projects
Before resuming any ongoing project, always start with:
"What do you remember about [Project Name]?"Quick Reference Card
Everything you need, at a glance. Bookmark this page.
Daemon Control
openclaw startStart daemonopenclaw stopStop daemonopenclaw restartStop + startopenclaw statusRunning state + channelsopenclaw healthSystem health checkopenclaw logs --tail 50Last 50 log linesConfig
openclaw config get [key]Read a config valueopenclaw config set [key] [val]Write a config valueopenclaw config validateValidate openclaw.json syntaxSkills
openclaw skills listList installed skillsopenclaw skills install [name]Install from catalogopenclaw skills updateSync from GitHubTasks & Discord
openclaw task "text"Send a task to the agentopenclaw discord pairPair Discord botopenclaw guild create --name "X"Create Discord workspaceopenclaw onboardRe-run onboarding wizard🚨 Something Broke? Run These in Order
openclaw health # Overall health check
openclaw status # Running services + active channels
openclaw logs --tail 50 # Last 50 lines of logs
openclaw config validate # Check openclaw.json syntax
openclaw gateway status # Gateway port and connections