trucmunroc.ai automation

TrucBot (OpenClaw) Setup Guide

Two-Machine Architecture and Setup Guide for AI Agent Development

What We're Building

This guide walks through setting up a two-machine development environment for TrucBot (OpenClaw) agent development. The architecture separates the daily-use workstation from the dedicated AI Bot server, creating a clean workspace while keeping the agent runtime isolated and always available.

System Diagram

MainMac Primary Workstation Claude Chat (Pro) Planning · Documentation · Q&A Model: Opus 4.6 / Sonnet 4.5 VS Code + Remote-SSH File browsing · Editor · Terminal Workspace: MiniMac-OpenClaw Claude Code (Local) Local projects on MainMac Model: Sonnet 4.5 (default) ~/.ssh/config Host Claw HostName 192.168.x.x LocalForward 18789 MiniMac TrucBot Server OpenClaw Agent Runtime AI agent "TrucBot" · Skills · Integrations Model: Haiku 4.5 (execution) OpenClaw Dashboard Web UI on localhost:18789 Accessed via SSH tunnel on MainMac Claude Code (Remote) Runs in VS Code remote terminal Model: Sonnet 4.5 (default) ~/.openclaw/ skills/ · integrations/ · config/ agents/ · automations/ · logs/ ~/.claude/settings.json SSH Remote Port 18789 Anthropic API

Machine Roles

MainMac — Primary Workstation

Your daily driver. Runs VS Code with the Remote-SSH extension to connect into MiniMac. Also runs the Claude chat interface (browser) for planning, documentation, and general Q&A. Claude Code is installed locally for any MainMac-specific projects.

MiniMac — TrucBot (Openclaw) Server

The dedicated server running the OpenClaw agent runtime and dashboard. The AI agent "TrucBot" lives here, executing skills using Haiku 4.5 for cost-efficient task completion. Claude Code is installed here and accessed through VS Code's remote terminal for development work.

Three Ways to Work with Claude

Interface Purpose Model Runs On
Claude Chat Planning, architecture, documentation, brainstorming Opus 4.6 / Sonnet 4.5 MainMac (browser)
Claude Code Building skills, editing files, running commands Sonnet 4.5 (default) MiniMac (via VS Code)
Anthropic API Agent execution — Claw runs skills autonomously Haiku 4.5 MiniMac (runtime)
Use Claude Chat for the thinking work, Claude Chat or Code for the building work, and let Haiku handle the executing work. This keeps costs low while maximizing capability where it matters.

Getting Started

Prerequisites

Two Mac computers on the same local network, a Claude Pro subscription (or higher), and an Anthropic API key for agent execution.

Step 1 — Enable SSH on the Server

On MiniMac, open System Settings → General → Sharing → Remote Login and enable it. Ensure your user account is in the allowed users list.

Step 2 — Configure SSH on the Workstation

On MainMac, create or edit ~/.ssh/config:

Host Claw
    HostName 192.168.x.x       # MiniMac's local IP
    User your-username
    LocalForward 18789 localhost:18789  # Dashboard tunnel
    ServerAliveInterval 60
    ServerAliveCountMax 3
    TCPKeepAlive yes

Step 3 — Install VS Code Remote-SSH

Install the Remote - SSH extension (by Microsoft) in VS Code on MainMac. Connect via Cmd+Shift+P → Remote-SSH: Connect to Host → Claw.

macOS may block VS Code from accessing the local network. If you see a LocalNetworkPermissionMacOS error, go to System Settings → Privacy & Security → Local Network and enable VS Code.

Step 4 — Install Claude Code on MiniMac

From the VS Code remote terminal (which runs on MiniMac):

# Install via npm (Node.js required)
npm install -g @anthropic-ai/claude-code

# Verify
claude --version

# Launch and authenticate
claude

# Set default model
mkdir -p ~/.claude
echo '{"model": "sonnet"}' > ~/.claude/settings.json
If the native installer (curl -fsSL https://cli.anthropic.com/install.sh | sh) fails with a DNS error, the npm method works identically. If you hit permission errors on npm, configure a user-level global directory with npm config set prefix '~/.npm-global'.

Step 5 — Install Claude Code on MainMac (Optional)

Repeat the same installation on MainMac for local project work. Same process — install, authenticate, set default model.

Step 6 — Save Your VS Code Workspace

While connected to MiniMac in VS Code, go to File → Save Workspace As and save it on MainMac. This lets you reconnect to MiniMac with one click.

Model Selection Guide

Model Best For Cost
Opus 4.6 Complex architecture decisions, multi-file debugging, deep reasoning Highest — use sparingly
Sonnet 4.5 Daily development, skill building, file editing, automation scripts Balanced — great default for Claude Code
Haiku 4.5 Agent execution, well-defined skill tasks, high-volume operations Lowest — ideal for Claw's runtime

Switch models on the fly in Claude Code with /model opus or /model sonnet. Your default is set in ~/.claude/settings.json.

Typical Development Session

  1. Open VS Code workspace — Double-click your saved workspace file. VS Code reconnects to MiniMac automatically.
  2. Open the integrated terminal — This runs on MiniMac via the SSH tunnel. Navigate to ~/.openclaw.
  3. Launch Claude Code — Run claude in the terminal. Start building: "Create a new skill that queries the ticketing system."
  4. Review changes in the editor — Claude Code edits files directly. You see changes instantly in VS Code's file explorer and editor pane.
  5. Test with Claw — Once your skill is built, test it through the OpenClaw Dashboard (accessible at localhost:18789 via the SSH tunnel).
  6. Use Claude Chat for planning — Switch to the browser for architecture discussions, documentation, or brainstorming your next integration.

Common Issues

VS Code: "No route to host"

macOS Local Network permission. System Settings → Privacy & Security → Local Network → enable VS Code.

npm: EACCES permission denied

Don't use sudo. Fix with: mkdir -p ~/.npm-global && npm config set prefix '~/.npm-global' then add ~/.npm-global/bin to your PATH.

Native installer: DNS resolution failure

If cli.anthropic.com doesn't resolve, fall back to the npm install method: npm install -g @anthropic-ai/claude-code

SSH disconnects during long sessions

Ensure your SSH config includes ServerAliveInterval 60 and ServerAliveCountMax 3 to maintain the keepalive heartbeat.