Update: Use 'source' instead of 'bash' for bootstrap

- Changed: bash <(...) → source <(...)
- Benefits: PATH updates immediately, no shell restart needed
- init-project available right after bootstrap completes
- Cleaner workflow for VPS setup
This commit is contained in:
root
2025-11-23 22:06:41 +00:00
parent 2f25d70674
commit 20bfcfe66c

View File

@@ -5,14 +5,14 @@
Run this **once** on your new VPS to bootstrap agents and helper tools: Run this **once** on your new VPS to bootstrap agents and helper tools:
```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)
``` ```
This: This:
- ✅ Clones homelab-agents to `~/.homelab-agents` - ✅ Clones homelab-agents to `~/.homelab-agents`
- ✅ Installs helper scripts to `~/.homelab-scripts` - ✅ Installs helper scripts to `~/.homelab-scripts`
- ✅ Sets up git configuration - ✅ Sets up git configuration
- ✅ Makes agents ready to use -**Makes agents and commands available immediately** (no shell restart needed!)
## Creating a New Project ## Creating a New Project
@@ -28,6 +28,7 @@ This:
- ✅ Creates `my-new-app` directory - ✅ Creates `my-new-app` directory
- ✅ Initializes git repository - ✅ Initializes git repository
-**Automatically configures Gitea remote** -**Automatically configures Gitea remote**
- ✅ Copies agents to `.claude/agents/`
- ✅ Sets git user config - ✅ Sets git user config
- ✅ Ready to start work - ✅ Ready to start work
@@ -50,7 +51,7 @@ cd ~/projects/my-new-app
Every time you run bootstrap: Every time you run bootstrap:
```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)
``` ```
It will: It will:
@@ -69,7 +70,7 @@ init-project <name> # Initialize a new project with git remote
Current agents in the repository: Current agents in the repository:
- **sysadmin-session-closer** - Closes sessions and creates session summaries - **sysadmin-session-closer** - Closes sessions and creates session summaries
- Located at: `~/.homelab-agents/agents/` - Located at: `~/.homelab-agents/agents/` or `.claude/agents/` in your project
## Project Structure ## Project Structure
@@ -77,19 +78,22 @@ Your typical VPS layout:
``` ```
~/projects/ ~/projects/
├── project-1/ ├── project-1/
── .git (remote: http://100.120.125.113:3000/pdm/project-1.git) ── .git (remote: http://100.120.125.113:3000/pdm/project-1.git)
│ └── .claude/agents/ (agents for Claude Code)
├── project-2/ ├── project-2/
── .git (remote: http://100.120.125.113:3000/pdm/project-2.git) ── .git (remote: http://100.120.125.113:3000/pdm/project-2.git)
│ └── .claude/agents/
└── project-3/ └── project-3/
── .git (remote: http://100.120.125.113:3000/pdm/project-3.git) ── .git (remote: http://100.120.125.113:3000/pdm/project-3.git)
└── .claude/agents/
``` ```
Each project is independent with its own Gitea repository. Each project is independent with its own Gitea repository and local agents.
## Workflow Summary ## Workflow Summary
1.**Bootstrap** (once): `bash <(curl -s ...bootstrap-agents.sh)` 1.**Bootstrap** (once): `source <(curl -s ...bootstrap-agents.sh)`
2.**Init Project**: `init-project my-app` 2.**Init Project**: `init-project my-app` (agents copied automatically)
3.**Work**: Create files, make changes 3.**Work**: Create files, make changes
4.**Close Session**: Use summary agent → auto-commits & pushes 4.**Close Session**: Use summary agent → auto-commits & pushes
5.**Resume**: Clone from Gitea next time 5.**Resume**: Clone from Gitea next time