diff --git a/scripts/README.md b/scripts/README.md index e6644d6..4cdad74 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -1,3 +1,65 @@ # Scripts Utility scripts for agent installation and management. + +## bootstrap-agents.sh + +**Purpose:** Ensures the latest homelab agents are available on any VPS instance. + +**What it does:** +- Clones the homelab-agents repository if not present +- Updates the repository to latest version if it exists +- Verifies agents are available for use +- Sets up git remotes for future VPS work + +**Usage:** + +### Option 1: Source in current session +```bash +source <(curl -s http://100.120.125.113:3000/raw/pdm/homelab-agents/main/scripts/bootstrap-agents.sh) +``` + +### Option 2: Add to ~/.bashrc for automatic setup +```bash +# Add this line to ~/.bashrc: +source ~/.homelab-setup.sh 2>/dev/null + +# Then copy the script: +curl -s http://100.120.125.113:3000/raw/pdm/homelab-agents/main/scripts/bootstrap-agents.sh > ~/.homelab-setup.sh +chmod +x ~/.homelab-setup.sh +``` + +### Option 3: Manual execution at session start +```bash +bash ~/.homelab-agents/scripts/bootstrap-agents.sh +``` + +**After bootstrapping:** + +The agents will be available at: +``` +~/.homelab-agents/agents/sysadmin-session-closer.md +~/.homelab-agents/agents/[other-agents].md +``` + +Use in Claude Code by referencing the agent path directly. + +**Example - Using the summary agent:** + +In your Claude Code session, when you want to close the session: +``` +Use the agent at ~/.homelab-agents/agents/sysadmin-session-closer.md +``` + +**Key Features:** +- ✅ Idempotent - safe to run multiple times +- ✅ Automatic updates - always gets latest agent versions +- ✅ Graceful error handling - provides clear feedback +- ✅ No manual git commands needed - fully automated + +**How it works across VPS instances:** + +1. Each VPS runs the bootstrap script at session start +2. Latest agents are pulled from Gitea +3. If you update an agent in Gitea, all VPSs get the new version on next bootstrap +4. Changes to agents are immediate across your entire homelab \ No newline at end of file