Skip to content

Latest commit

 

History

History
56 lines (45 loc) · 2.48 KB

File metadata and controls

56 lines (45 loc) · 2.48 KB

CLAUDE.md — openclaw2go-cli

Cross-platform Go CLI for OpenClaw2Go. Manages AI services (LLM, audio, image) natively on Mac via MLX, or via Docker on Linux/NVIDIA.

Build

make build          # Build for current platform
make build-all      # Cross-compile darwin/arm64, darwin/amd64, linux/amd64
make test           # Run tests
make lint           # go vet

Architecture

  • cmd/openclaw2go/main.go — Cobra CLI entry point with all commands
  • internal/platform/ — OS, arch, GPU, memory detection (Mac sysctl, Linux nvidia-smi)
  • internal/registry/ — Model/engine registry (embedded JSON + external fetch with cache)
  • internal/budget/ — Memory budget computation (Mac unified memory, NVIDIA VRAM)
  • internal/config/ — OPENCLAW_CONFIG parsing and profile resolution
  • internal/engine/ — Engine interface + MLX (Mac) and Docker (Linux) backends
  • internal/cloud/ — Runpod cloud deployment (API client, GPU selection, deploy state)
  • internal/setup/ — Prerequisites check, Python venv, pip install
  • internal/server/ — Embedded mflux FastAPI server wrapper

Key Design Decisions

  • Mac: MLX Python processes managed directly (mlx-lm, mlx-audio, mflux)
  • Linux: Wraps existing runpod/openclaw2go Docker image
  • Registry: go:embed for fallback, HTTP fetch from GitHub Pages with 1h cache
  • State directory: ~/.openclaw2go/ (venv, registry cache, PIDs, logs)
  • Memory budget: Mac reserves 6 GB for OS; Linux uses nvidia-smi VRAM
  • Minimum 16k context: Required for OpenClaw to function

CLI Commands

openclaw2go version     # Version + detected hardware
openclaw2go doctor      # Prerequisite checks
openclaw2go setup       # Install deps (Mac: venv+pip, Linux: Docker check)
openclaw2go start       # Start services (--config '{"llm":true}')
openclaw2go stop        # Stop all services
openclaw2go status      # Running services info
openclaw2go models      # List available models (--type llm|audio|image)
openclaw2go fit         # What fits on this hardware (--memory override)
openclaw2go registry fetch/status  # Registry management
openclaw2go deploy      # Deploy to Runpod cloud (--llm, --gpu, --dry-run, --json)
openclaw2go deploy list # List cloud deployments
openclaw2go deploy status [pod-id]  # Deployment status
openclaw2go undeploy    # Terminate cloud deployment

Related Repos

  • runpod-workers/openclaw2go — Docker image (NVIDIA/CUDA)
  • runpod-workers/openclaw2go-registry — External model registry (GitHub Pages)