Update: Scripts README to use 'source' for bootstrap

- Changed: bash <(...) → source <(...)
- Emphasize agents copied to .claude/agents/
- Clarify agent locations for Claude Code
- Update workflow examples
- Explain why source is better
This commit is contained in:
root
2025-11-23 22:07:14 +00:00
parent 20bfcfe66c
commit 7e62a571aa

View File

@@ -17,9 +17,14 @@ Utility scripts for agent installation and project management.
Run this **once** on your new VPS: Run this **once** on your new VPS:
```bash ```bash
bash <(curl -s http://100.120.125.113:3000/pdm/homelab-agents/raw/branch/main/scripts/bootstrap-agents.sh) source <(curl -s http://100.120.125.113:3000/pdm/homelab-agents/raw/branch/main/scripts/bootstrap-agents.sh)
``` ```
**Why use `source`?**
- Uses `source` instead of `bash` so PATH updates immediately in your current shell
- `init-project` and other commands are available right away
- No need to manually run `source ~/.bashrc` afterward
**Output:** **Output:**
``` ```
✨ Homelab agents bootstrap complete! ✨ Homelab agents bootstrap complete!
@@ -33,11 +38,12 @@ bash <(curl -s http://100.120.125.113:3000/pdm/homelab-agents/raw/branch/main/sc
## init-project ## init-project
**Purpose:** Quickly initialize new VPS projects with automatic Gitea remote configuration. **Purpose:** Quickly initialize new VPS projects with automatic Gitea remote configuration and agent setup.
**Problem it solves:** **Problem it solves:**
- No more manual git setup - No more manual git setup
- No more being asked for repository URL - No more being asked for repository URL
- Agents automatically copied to project
- Consistent project initialization across all VPS instances - Consistent project initialization across all VPS instances
- Remote is ready before any work starts - Remote is ready before any work starts
@@ -47,6 +53,8 @@ bash <(curl -s http://100.120.125.113:3000/pdm/homelab-agents/raw/branch/main/sc
3. Sets up git user config 3. Sets up git user config
4. **Automatically configures Gitea remote** (no prompts!) 4. **Automatically configures Gitea remote** (no prompts!)
5. Creates initial main branch 5. Creates initial main branch
6. **Copies agents to `.claude/agents/`** for Claude Code
7. Provides clear next steps
**Usage:** **Usage:**
@@ -61,25 +69,29 @@ init-project my-new-app
📁 Creating project directory: my-new-app 📁 Creating project directory: my-new-app
🔧 Initializing git repository... 🔧 Initializing git repository...
🔗 Configuring Gitea remote... 🔗 Configuring Gitea remote...
📚 Setting up Claude Code agents...
✅ Copied 2 agent(s) to .claude/agents/
✅ Project initialized successfully! ✅ Project initialized successfully!
📋 Project Details: 📋 Project Details:
Name: my-new-app Name: my-new-app
Directory: /root/projects/my-new-app Directory: /home/pdm/projects/my-new-app
Remote: http://100.120.125.113:3000/pdm/my-new-app.git Remote: http://100.120.125.113:3000/pdm/my-new-app.git
Branch: main Branch: main
Agents: .claude/agents/
🚀 Next steps: 🚀 Next steps:
1. Start working in this directory 1. Start working in this directory
2. Create files and make changes 2. Create files and make changes
3. When done, use the summary agent 3. When done, use the summary agent: .claude/agents/sysadmin-session-closer.md
4. Agent will automatically commit and push to Gitea 4. Agent will automatically commit and push to Gitea
``` ```
**What happens next:** **What happens next:**
- Work normally in your project directory - Work normally in your project directory
- Git remote is already configured - Git remote is already configured
- Agents are locally available in `.claude/agents/`
- When you use the summary agent, it knows exactly where to push - When you use the summary agent, it knows exactly where to push
- No more "What's the Gitea remote URL?" prompts! - No more "What's the Gitea remote URL?" prompts!
@@ -91,6 +103,16 @@ Each project gets its own independent Gitea repository:
Projects on the same VPS are separate and independent. Projects on the same VPS are separate and independent.
**Agent Location:**
Agents are available at:
```
.claude/agents/sysadmin-session-closer.md
.claude/agents/[other-agents].md
```
Claude Code will automatically find them here.
**Installation:** **Installation:**
`init-project` is automatically installed by bootstrap-agents.sh to: `init-project` is automatically installed by bootstrap-agents.sh to:
@@ -106,7 +128,7 @@ It's added to your PATH, so you can run it from anywhere.
### First Time on a VPS ### First Time on a VPS
```bash ```bash
bash <(curl -s http://100.120.125.113:3000/pdm/homelab-agents/raw/branch/main/scripts/bootstrap-agents.sh) source <(curl -s http://100.120.125.113:3000/pdm/homelab-agents/raw/branch/main/scripts/bootstrap-agents.sh)
``` ```
### For Each New Project ### For Each New Project
@@ -118,9 +140,9 @@ cd my-app
``` ```
### Closing a Session ### Closing a Session
Use the summary agent: Use the summary agent at:
``` ```
~/.homelab-agents/agents/sysadmin-session-closer.md .claude/agents/sysadmin-session-closer.md
``` ```
The agent will: The agent will: