Add self-deploying setup scripts for all sub-projects (P1-P8)

- Root setup.sh orchestrator with per-phase dispatch (./setup.sh p1..p8 | all | status)
- Makefile convenience targets (make infra, make llm, make status, etc.)
- scripts/common.sh: shared bash library for OS detection, Docker helpers,
  service management (launchd/systemd), package install, env management
- .env.example + .gitignore: shared config template and secret exclusions

P1 (homeai-infra): full implementation
- docker-compose.yml: Uptime Kuma, code-server, n8n
- Note: Home Assistant, Portainer, Gitea are pre-existing instances
- setup.sh: Docker install, homeai network, container health checks

P2 (homeai-llm): full implementation
- Ollama native install with CUDA/ROCm/Metal auto-detection
- launchd plist (macOS) + systemd service (Linux) for auto-start
- scripts/pull-models.sh: idempotent model puller from manifest
- scripts/benchmark.sh: tokens/sec measurement per model
- Open WebUI on port 3030 (avoids Gitea :3000 conflict)

P3-P8: working stubs with prerequisite checks and TODO sections

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Aodhan Collins
2026-03-04 21:10:53 +00:00
parent 38247d7cc4
commit 7978eaea14
23 changed files with 2525 additions and 0 deletions

55
homeai-character/setup.sh Normal file
View File

@@ -0,0 +1,55 @@
#!/usr/bin/env bash
# homeai-character/setup.sh — P5: Character Manager + persona JSON
#
# Components:
# - character.schema.json — v1 character config schema
# - aria.json — default character config
# - Character Manager UI — Vite/React app for editing (dev server :5173)
#
# No hard runtime dependencies (can be developed standalone).
# Output (aria.json) is consumed by P3, P4, P7.
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
REPO_DIR="$(cd "${SCRIPT_DIR}/.." && pwd)"
source "${REPO_DIR}/scripts/common.sh"
log_section "P5: Character Manager"
detect_platform
# ─── Prerequisite check ────────────────────────────────────────────────────────
log_info "Checking prerequisites..."
if ! command_exists node; then
log_warn "Node.js not found — required for Character Manager UI"
log_warn "Install: https://nodejs.org (v18+ recommended)"
fi
# ─── TODO: Implementation ──────────────────────────────────────────────────────
cat <<'EOF'
┌─────────────────────────────────────────────────────────────────┐
│ P5: homeai-character — NOT YET IMPLEMENTED │
│ │
│ Implementation steps: │
│ 1. Create schema/character.schema.json (v1) │
│ 2. Create characters/aria.json (default persona) │
│ 3. Set up Vite/React project in src/ │
│ 4. Extend character-manager.jsx with full UI │
│ 5. Add schema validation (ajv) │
│ 6. Add expression mapper UI for Live2D │
│ 7. Wire export to ~/.openclaw/characters/ │
│ │
│ Dev server: │
│ cd homeai-character && npm run dev → http://localhost:5173 │
│ │
│ Interface contracts: │
│ Output: ~/.openclaw/characters/<name>.json │
│ Schema: homeai-character/schema/character.schema.json │
└─────────────────────────────────────────────────────────────────┘
EOF
log_info "P5 is not yet implemented. See homeai-character/PLAN.md for details."
exit 0