Homelab Automation cb89dfccbb Fix Step 7: SSH Agent persistence now works correctly
PROBLEM: Original Step 7 script was buggy - agent would die on logout

SOLUTION: Rewritten Step 7 with proper ssh-agent persistence that:
- Detects existing running agents and reuses socket
- Persists socket location across shell sessions
- Auto-loads SSH key on new terminals
- Works reliably across multiple terminal windows

Key changes:
- Saves SSH_AUTH_SOCK to ~/.ssh/agent.sock for persistence
- Auto-adds key if not already loaded
- Includes simpler fallback version if complex version fails
- Detailed troubleshooting section
- Clear instructions on placement in ~/.bashrc

Agent now stays loaded for the entire user session duration.
2025-11-27 06:23:00 +00:00

Homelab Agents

Central storage for AI agent prompts shared across all VPS instances.

Quick Start

For new VPS instances, run this once:

source <(curl -s http://100.120.125.113:3000/pdm/homelab-agents/raw/branch/main/scripts/bootstrap-agents.sh)

This sets up everything you need. See QUICK-START.md for detailed instructions.

Structure

  • agents/ - Agent prompt definitions
  • scripts/ - Helper scripts (bootstrap-agents.sh, init-project, etc.)
  • templates/ - Template files for agents and session summaries

Available Agents

  • sysadmin-session-closer - Automatically closes and documents dev sessions
    • Use at end of sessions to commit and push work
    • Generates comprehensive session summaries
    • Handles git workflows automatically via SSH

Usage

First Time on a VPS

source <(curl -s http://100.120.125.113:3000/pdm/homelab-agents/raw/branch/main/scripts/bootstrap-agents.sh)

Create a New Project

Step 1: Create repository on Gitea Go to http://100.120.125.113:3000/repo/create

  • Repository name: my-project
  • Click Create

Step 2: Initialize project locally

init-project my-project
cd my-project
# Start working...

Each project automatically gets:

  • Git repo with SSH remote configured (git@100.120.125.113:pdm/my-project.git)
  • Agents available at .claude/agents/
  • Git user info set up

Close a Session

Use the summary agent from your project:

.claude/agents/sysadmin-session-closer.md

The agent will:

  • Create comprehensive session summary
  • Commit all changes
  • Push to Gitea via SSH automatically

Documentation

Repository Information

Workflow Summary

  1. Bootstrap VPS: source <(curl -s ...bootstrap-agents.sh)
  2. Create repo on Gitea: http://100.120.125.113:3000/repo/create
  3. Init project: init-project my-project
  4. Work on project
  5. Close session with agent
  6. Agent auto-commits and pushes via SSH
Description
Central storage for AI agent prompts
Readme 194 KiB
Languages
Shell 100%