Skip to content

WF-003: Multi-Machine Setup

DOCUMENT CONTROL

FieldValue
WF IDWF-003
Version1.0
StatusActive
Last UpdatedDecember 2025

Overview

This workflow covers setting up Happy Coder across multiple development machines for maximum flexibility and parallel task execution.

Multi-Machine Architecture

┌─────────────────────────────────────────────────────────────────┐
│                    MULTI-MACHINE SETUP                          │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│                     ┌─────────────────┐                        │
│                     │  Happy Coder    │                        │
│                     │  Mobile App     │                        │
│                     └────────┬────────┘                        │
│                              │                                  │
│              ┌───────────────┼───────────────┐                 │
│              │               │               │                  │
│              ▼               ▼               ▼                  │
│  ┌───────────────┐ ┌───────────────┐ ┌───────────────┐        │
│  │   Laptop      │ │   Desktop     │ │   VPS/Cloud   │        │
│  │ (Development) │ │ (Heavy Build) │ │ (Deployment)  │        │
│  └───────────────┘ └───────────────┘ └───────────────┘        │
│                                                                 │
│  Optional:                                                      │
│  ┌───────────────┐ ┌───────────────┐ ┌───────────────┐        │
│  │ Raspberry Pi  │ │   Mac Mini    │ │ Home Server   │        │
│  │ (Automation)  │ │ (iOS Builds)  │ │ (Background)  │        │
│  └───────────────┘ └───────────────┘ └───────────────┘        │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

Workflow Phases

┌─────────────┬─────────────┬─────────────┬─────────────┐
│  PHASE 1    │  PHASE 2    │  PHASE 3    │  PHASE 4    │
│  INVENTORY  │  INSTALL    │  CONFIGURE  │  OPTIMIZE   │
├─────────────┼─────────────┼─────────────┼─────────────┤
│ List all    │ Install     │ Pair each   │ Set up      │
│ available   │ happy-coder │ machine to  │ git         │
│ machines    │ on each     │ mobile app  │ worktrees   │
│             │ machine     │             │             │
│ Identify    │ Verify      │ Test        │ Create      │
│ use cases   │ Claude Code │ connections │ automation  │
└─────────────┴─────────────┴─────────────┴─────────────┘

Phase 1: Inventory Your Machines

Step 1: List Available Compute

Create an inventory of all machines:

MachineLocationSpecsPrimary Use
MacBook ProMobile16GB RAMDevelopment
Desktop PCOffice32GB RAM, GPUHeavy builds
DigitalOceanCloud4GB RAMStaging/Deploy
Raspberry PiHome4GB RAMAutomation

Step 2: Define Use Cases

Use CaseBest MachineWhy
Frontend devLaptopPortability
ML trainingDesktopGPU access
CI/CDVPSAlways online
Background jobsRaspberry PiLow power
iOS buildsMac MiniRequired

Phase 2: Install on Each Machine

For Each Machine:

Step 1: SSH or access the machine

Step 2: Install Happy Coder:

bash
npm install -g happy-coder

Step 3: Verify Claude Code is available:

bash
claude --version

Step 4: Test happy command:

bash
happy --version

Phase 3: Configure Connections

Pair Each Machine

For each machine, run:

bash
happy --auth

Then scan the QR code with your mobile app.

Verify All Connections

In the mobile app, check:

  • [ ] All machines appear in session list
  • [ ] Each shows correct hostname
  • [ ] Status indicators working

Connection Checklist

MachinePairedTestedNotes
LaptopPrimary device
DesktopUse for builds
VPSAuto-reconnects
Raspberry PiBackground tasks

Phase 4: Optimize Setup

Set Up Git Worktrees

On each machine, create worktrees for parallel experimentation:

bash
# Create worktrees
git worktree add ../project-experiment-1 -b experiment-1
git worktree add ../project-experiment-2 -b experiment-2
git worktree add ../project-experiment-3 -b experiment-3

Configure Auto-Start (Optional)

Linux (systemd):

bash
# /etc/systemd/system/happy.service
[Unit]
Description=Happy Coder Daemon
After=network.target

[Service]
Type=simple
User=youruser
WorkingDirectory=/home/youruser/project
ExecStart=/usr/local/bin/happy
Restart=always

[Install]
WantedBy=multi-user.target

Enable and start:

bash
sudo systemctl enable happy
sudo systemctl start happy

macOS (launchd):

xml
<!-- ~/Library/LaunchAgents/com.happy.daemon.plist -->
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
  "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Label</key>
    <string>com.happy.daemon</string>
    <key>ProgramArguments</key>
    <array>
        <string>/usr/local/bin/happy</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
    <key>KeepAlive</key>
    <true/>
</dict>
</plist>

Custom Session Names

Set descriptive names for each machine:

bash
# On laptop
HAPPY_SESSION_NAME="laptop-frontend" happy

# On desktop
HAPPY_SESSION_NAME="desktop-backend" happy

# On VPS
HAPPY_SESSION_NAME="vps-deploy" happy

Usage Patterns

Pattern 1: Parallel Exploration

Start the same experiment on multiple machines:

bash
# Machine 1: Approach A
cd ~/project-a && happy

# Machine 2: Approach B
cd ~/project-b && happy

# Machine 3: Approach C
cd ~/project-c && happy

Compare results on your phone, pick the winner.

Pattern 2: Pipeline Distribution

StageMachineTask
1LaptopWrite code
2DesktopRun tests
3VPSDeploy staging
4MobileApprove production

Pattern 3: Specialized Tasks

Task TypeMachineWhy
Quick changesLaptopFast access
Heavy buildsDesktopMore RAM/CPU
Long-runningVPSAlways online
Background automationRaspberry PiLow power

Success Criteria

  • [ ] All machines paired successfully
  • [ ] Sessions visible in mobile app
  • [ ] Can switch between machines smoothly
  • [ ] Push notifications from all machines
  • [ ] Auto-reconnect working on all machines

Released under the MIT License.