executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
snapmakerControl and monitor Snapmaker 2.0 3D printers via their HTTP API. Status, job management, progress watching, and event monitoring.
Independent GitHub snapshot · Automated classification · Original documentation governs
Control and monitor Snapmaker 2.0 3D printers via their HTTP API.
Config stored in ~/clawd/snapmaker/config.json:
{
"ip": "192.168.0.32",
"token": "your-token-here",
"port": 8080
}
Finding your token:
~/Library/Application Support/snapmaker-luban/machine.json%appdata%\snapmaker-luban\machine.json~/.config/snapmaker-luban/machine.jsonLook for the server.token field (second "token" in the file).
# Get current printer status
python3 scripts/snapmaker.py status
# Watch print progress (updates every 5 seconds)
python3 scripts/snapmaker.py watch
# Get status as JSON
python3 scripts/snapmaker.py status --json
# Send a file (prepares but doesn't start)
python3 scripts/snapmaker.py send ~/prints/model.gcode
# Send and start immediately
python3 scripts/snapmaker.py send ~/prints/model.gcode --start --yes
# Pause current print
python3 scripts/snapmaker.py pause --yes
# Resume paused print
python3 scripts/snapmaker.py resume --yes
# Stop/cancel print (requires confirmation)
python3 scripts/snapmaker.py stop
--yes - Skip confirmation prompts (use with caution!)--force - Override safety checks (NOT RECOMMENDED)All commands that modify state require confirmation unless --yes is provided.
The skill uses these Snapmaker HTTP API v1 endpoints:
POST /api/v1/connect - Establish connectionGET /api/v1/status - Get printer statusPOST /api/v1/prepare_print - Upload filePOST /api/v1/start_print - Start printingPOST /api/v1/pause - Pause printPOST /api/v1/resume - Resume printPOST /api/v1/stop - Stop/cancel printGET /api/v1/print_file - Download last fileThe status command returns:
To detect events:
# Watch for completion
python3 scripts/snapmaker.py watch
# Or poll status in a loop
while true; do
python3 scripts/snapmaker.py status --json | jq -r '.printStatus'
sleep 10
done
Event detection:
python3 scripts/snapmaker.py status | grep -q "RUNNING" && echo "Busy" || echo "Available"
python3 scripts/snapmaker.py status --json | jq -r '.remainingTime'
python3 scripts/snapmaker.py status --json | jq '{nozzle: .nozzleTemperature1, bed: .heatedBedTemperature}'
Connection refused:
ping 192.168.0.32Invalid token:
machine.json~/clawd/snapmaker/config.jsonCan't send file:
python3 scripts/snapmaker.py status--force only if absolutely necessaryrequests library (install: pip3 install requests)Part of OpenClaw skills collection.