Update: Scripts README emphasizes repo creation step
- IMPORTANT: Clarify repo must be created on Gitea FIRST - Add Step 1: Create repository on Gitea - Add Step 2: Run init-project - Provide direct link to Gitea repo creation - Show example output with SSH remote - Update workflow summary with correct order
This commit is contained in:
@@ -25,40 +25,36 @@ source <(curl -s http://100.120.125.113:3000/pdm/homelab-agents/raw/branch/main/
|
||||
- `init-project` and other commands are available right away
|
||||
- No need to manually run `source ~/.bashrc` afterward
|
||||
|
||||
**Output:**
|
||||
```
|
||||
✨ Homelab agents bootstrap complete!
|
||||
|
||||
📚 Available commands:
|
||||
init-project <name> - Initialize a new project with git remote
|
||||
cd ~/.homelab-agents - Browse agents and scripts
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## init-project
|
||||
|
||||
**Purpose:** Quickly initialize new VPS projects with automatic Gitea remote configuration and agent setup.
|
||||
|
||||
**Problem it solves:**
|
||||
- No more manual git setup
|
||||
- No more being asked for repository URL
|
||||
- Agents automatically copied to project
|
||||
- Consistent project initialization across all VPS instances
|
||||
- Remote is ready before any work starts
|
||||
**Important:** The Gitea repository must be created FIRST on the web UI.
|
||||
|
||||
**What it does:**
|
||||
1. Creates a new project directory
|
||||
2. Initializes git repository
|
||||
3. Sets up git user config
|
||||
4. **Automatically configures Gitea remote** (no prompts!)
|
||||
4. **Automatically configures SSH remote** to your Gitea repo
|
||||
5. Creates initial main branch
|
||||
6. **Copies agents to `.claude/agents/`** for Claude Code
|
||||
7. Provides clear next steps
|
||||
|
||||
**Usage:**
|
||||
**Workflow:**
|
||||
|
||||
### Step 1: Create Repository on Gitea (First!)
|
||||
|
||||
Go to: http://100.120.125.113:3000/repo/create
|
||||
|
||||
- **Repository name**: `my-new-app`
|
||||
- **Visibility**: Public or Private
|
||||
- **Initialize repository**: Leave unchecked (init-project will set it up)
|
||||
- Click "Create Repository"
|
||||
|
||||
### Step 2: Initialize Local Project
|
||||
|
||||
From your projects directory:
|
||||
```bash
|
||||
cd ~/projects
|
||||
init-project my-new-app
|
||||
@@ -68,7 +64,7 @@ init-project my-new-app
|
||||
```
|
||||
📁 Creating project directory: my-new-app
|
||||
🔧 Initializing git repository...
|
||||
🔗 Configuring Gitea remote...
|
||||
🔗 Configuring Gitea SSH remote...
|
||||
📚 Setting up Claude Code agents...
|
||||
✅ Copied 2 agent(s) to .claude/agents/
|
||||
|
||||
@@ -77,7 +73,7 @@ init-project my-new-app
|
||||
📋 Project Details:
|
||||
Name: my-new-app
|
||||
Directory: /home/pdm/projects/my-new-app
|
||||
Remote: http://100.120.125.113:3000/pdm/my-new-app.git
|
||||
Remote: git@100.120.125.113:pdm/my-new-app.git
|
||||
Branch: main
|
||||
Agents: .claude/agents/
|
||||
|
||||
@@ -85,21 +81,21 @@ init-project my-new-app
|
||||
1. Start working in this directory
|
||||
2. Create files and make changes
|
||||
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 (via SSH)
|
||||
```
|
||||
|
||||
**What happens next:**
|
||||
- Work normally in your project directory
|
||||
- Git remote is already configured
|
||||
- Git remote is already configured to use SSH
|
||||
- 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 pushes via SSH (no passwords!)
|
||||
- No more "What's the Gitea remote URL?" prompts!
|
||||
|
||||
**Project Repository:**
|
||||
|
||||
Each project gets its own independent Gitea repository:
|
||||
- Project: `my-new-app` → Repository: `http://100.120.125.113:3000/pdm/my-new-app.git`
|
||||
- Project: `project-2` → Repository: `http://100.120.125.113:3000/pdm/project-2.git`
|
||||
- Project: `my-new-app` → Repository: `git@100.120.125.113:pdm/my-new-app.git`
|
||||
- Project: `project-2` → Repository: `git@100.120.125.113:pdm/project-2.git`
|
||||
|
||||
Projects on the same VPS are separate and independent.
|
||||
|
||||
@@ -111,7 +107,7 @@ Agents are available at:
|
||||
.claude/agents/[other-agents].md
|
||||
```
|
||||
|
||||
Claude Code will automatically find them here.
|
||||
Claude Code will automatically find them.
|
||||
|
||||
**Installation:**
|
||||
|
||||
@@ -133,6 +129,10 @@ source <(curl -s http://100.120.125.113:3000/pdm/homelab-agents/raw/branch/main/
|
||||
|
||||
### For Each New Project
|
||||
```bash
|
||||
# 1. Go to Gitea and create the repo
|
||||
# http://100.120.125.113:3000/repo/create
|
||||
|
||||
# 2. Initialize project locally
|
||||
cd ~/projects
|
||||
init-project my-app
|
||||
cd my-app
|
||||
@@ -148,4 +148,4 @@ Use the summary agent at:
|
||||
The agent will:
|
||||
- Create session summary
|
||||
- Commit changes
|
||||
- Push to Gitea (using the remote we set up earlier)
|
||||
- Push to Gitea via SSH (automated!)
|
||||
Reference in New Issue
Block a user