Files
ROMFASTSQL/proxmox/claude-agent/work.sh
Marius 594b77e449 Add Claude Agent LXC setup and workflow scripts
- Create LXC 171 (claude-agent) on pveelite with Ubuntu 24.04
- Install Node.js 20.x, Claude Code, tmux, Tailscale
- Configure SSH access and Gitea integration
- Add workflow scripts: start-agent.sh, work.sh, new-task.sh, finish-task.sh
- Add code-server for mobile file browsing
- Document complete setup in proxmox/claude-agent/README.md

LXC Details:
- IP internal: 10.0.20.171
- IP Tailscale: 100.95.55.51
- code-server: port 8080

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31 18:53:23 +02:00

105 lines
2.6 KiB
Bash

#!/bin/bash
# Script all-in-one pentru workflow cu selecție proiect
WORKSPACE="/workspace"
source ~/.nvm/nvm.sh
echo "🚀 Claude Workflow"
echo "=================="
echo ""
# Listează proiectele (directoare cu .git)
echo "📁 Proiecte disponibile:"
echo ""
projects=()
i=1
for dir in "$WORKSPACE"/*/; do
if [ -d "$dir/.git" ]; then
name=$(basename "$dir")
projects+=("$dir")
echo " $i) $name"
((i++))
fi
done
if [ ${#projects[@]} -eq 0 ]; then
echo "❌ Nu am găsit proiecte Git în $WORKSPACE"
exit 1
fi
echo ""
read -p "Alege proiect [1-$((i-1))]: " proj_choice
if [ -z "$proj_choice" ] || [ "$proj_choice" -lt 1 ] || [ "$proj_choice" -gt ${#projects[@]} ]; then
echo "❌ Selecție invalidă"
exit 1
fi
PROJECT_DIR="${projects[$((proj_choice-1))]}"
PROJECT_NAME=$(basename "$PROJECT_DIR")
cd "$PROJECT_DIR" || exit 1
echo ""
echo "📂 Proiect: $PROJECT_NAME"
echo "🌿 Branch curent: $(git branch --show-current)"
echo ""
echo "Ce vrei să faci?"
echo " 1) Începe task nou (branch nou)"
echo " 2) Continuă task existent"
echo " 3) Finalizează task (commit + push)"
echo " 4) Vezi branch-uri"
echo " 5) Pornește Claude pe branch-ul curent"
echo ""
read -p "Alege [1-5]: " choice
case $choice in
1)
read -p "Nume branch (ex: fix/bug-login): " BRANCH_NAME
git checkout main 2>/dev/null || git checkout master
git pull
git checkout -b "$BRANCH_NAME"
echo "✅ Branch creat: $BRANCH_NAME"
echo "Pornesc Claude..."
claude
;;
2)
echo "Branch-uri locale:"
git branch
echo ""
read -p "Nume branch: " BRANCH_NAME
git checkout "$BRANCH_NAME"
echo "Pornesc Claude..."
claude
;;
3)
BRANCH=$(git branch --show-current)
if [ "$BRANCH" = "main" ] || [ "$BRANCH" = "master" ]; then
echo "❌ Ești pe $BRANCH! Nu face commit direct aici."
exit 1
fi
echo "📋 Status:"
git status --short
echo ""
read -p "Mesaj commit: " COMMIT_MSG
if [ -n "$COMMIT_MSG" ]; then
git add .
git commit -m "$COMMIT_MSG"
git push -u origin "$BRANCH"
echo "✅ Push făcut pe $BRANCH"
fi
;;
4)
echo "Branch curent: $(git branch --show-current)"
echo ""
git branch -a
;;
5)
echo "Pornesc Claude pe $(git branch --show-current)..."
claude
;;
*)
echo "Opțiune invalidă"
;;
esac