Riorganizzazione: Nuova struttura orto-suite/ - No more .skill zips, pronto per copia diretta

This commit is contained in:
Noe 2026-03-07 02:00:05 +01:00
parent 1d2401e647
commit c729f59621
29 changed files with 5642 additions and 135 deletions

View file

@ -1,110 +1,141 @@
#!/bin/bash
# Orto Skills Suite v1.0 — Installation Script
# For teams: Extract & install all 9 skills
##############################################################################
# INSTALL.sh - Orto Skills Suite Installation
#
# Copia la cartella orto-suite/ in ~/.openclaw/skills/
#
# Usage:
# ./INSTALL.sh
#
# Output:
# - Copia orto-suite/ → ~/.openclaw/skills/orto-suite/
# - Verifica 9 skill + references
# - Ready for use
##############################################################################
set -e
echo "╔════════════════════════════════════════════════════════════════╗"
echo "║ Orto Skills Suite v1.0 — Team Installation Script ║"
echo "╚════════════════════════════════════════════════════════════════╝"
echo ""
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
SOURCE_DIR="$SCRIPT_DIR/orto-suite"
TARGET_DIR="$HOME/.openclaw/skills/orto-suite"
# Determine installation directory
if [ -z "$OPENCLAW_SKILLS_DIR" ]; then
INSTALL_DIR="${HOME}/.openclaw/skills/orto-suite"
else
INSTALL_DIR="$OPENCLAW_SKILLS_DIR/orto-suite"
fi
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
NC='\033[0m'
echo "📂 Installation directory: $INSTALL_DIR"
echo ""
log() {
echo -e "${BLUE}[$(date +'%H:%M:%S')]${NC} $1"
}
# Create directory
if [ ! -d "$INSTALL_DIR" ]; then
echo "📁 Creating directory..."
mkdir -p "$INSTALL_DIR"
else
echo "⚠️ Directory already exists. Backing up existing..."
mv "$INSTALL_DIR" "${INSTALL_DIR}.backup.$(date +%s)"
mkdir -p "$INSTALL_DIR"
fi
error() {
echo -e "${RED}[ERROR]${NC} $1" >&2
}
# Find .skill files (in current dir or subdirs)
SKILL_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
DIST_DIR="$SKILL_DIR/build/dist"
success() {
echo -e "${GREEN}[✓]${NC} $1"
}
if [ ! -d "$DIST_DIR" ]; then
echo "❌ Error: build/dist/ not found!"
echo " Expected at: $DIST_DIR"
warning() {
echo -e "${YELLOW}[⚠]${NC} $1"
}
# ============================================================================
log "=== Orto Skills Suite Installation ==="
# Verifica source directory esiste
if [ ! -d "$SOURCE_DIR" ]; then
error "Source directory not found: $SOURCE_DIR"
exit 1
fi
echo "📦 Installing 9 skills from: $DIST_DIR"
echo ""
success "Source directory found: $SOURCE_DIR"
# Extract all .skill files
skill_count=0
for skill in "$DIST_DIR"/*.skill; do
if [ -f "$skill" ]; then
skill_name=$(basename "$skill" .skill)
echo " ⬇️ Installing $skill_name..."
unzip -q "$skill" -d "$INSTALL_DIR"
((skill_count++))
# Crea target directory se non esiste
mkdir -p "$(dirname "$TARGET_DIR")"
# Se target esiste già, chiedi conferma
if [ -d "$TARGET_DIR" ]; then
warning "Target directory already exists: $TARGET_DIR"
read -p "Overwrite? (y/n) " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
log "Backing up existing installation..."
BACKUP_DIR="$TARGET_DIR.backup.$(date +%s)"
mv "$TARGET_DIR" "$BACKUP_DIR"
success "Backup saved: $BACKUP_DIR"
else
log "Installation cancelled"
exit 0
fi
fi
# Copia orto-suite
log "Copying orto-suite to $TARGET_DIR..."
cp -r "$SOURCE_DIR" "$TARGET_DIR"
success "Copied successfully"
# Verifica installation
log "Verifying installation..."
# Count skill directories
SKILL_COUNT=$(find "$TARGET_DIR" -maxdepth 1 -name "orto-*" -type d | wc -l)
log "Found $SKILL_COUNT skill directories"
if [ "$SKILL_COUNT" -lt 9 ]; then
error "Expected 9 skills, found $SKILL_COUNT"
exit 1
fi
# Verifica SKILL.md files
SKILL_MD_COUNT=$(find "$TARGET_DIR" -maxdepth 2 -name "SKILL.md" -type f | wc -l)
log "Found $SKILL_MD_COUNT SKILL.md files"
if [ "$SKILL_MD_COUNT" -lt 9 ]; then
error "Expected 9 SKILL.md files, found $SKILL_MD_COUNT"
exit 1
fi
# Verifica references
if [ ! -d "$TARGET_DIR/references" ]; then
error "References directory not found"
exit 1
fi
REF_COUNT=$(find "$TARGET_DIR/references" -maxdepth 1 -name "*.md" -type f | wc -l)
log "Found $REF_COUNT reference files"
success "Installation verified"
# ============================================================================
echo ""
echo "╔════════════════════════════════════════════════════════════╗"
echo "║ ✅ INSTALLATION COMPLETED SUCCESSFULLY ║"
echo "╚════════════════════════════════════════════════════════════╝"
success "Skills installed: $SKILL_COUNT"
success "Installation directory: $TARGET_DIR"
echo ""
echo "=== INSTALLED SKILLS ==="
find "$TARGET_DIR" -maxdepth 2 -name "SKILL.md" -type f | sort | while read skillmd; do
skilldir=$(dirname "$skillmd")
skillname=$(basename "$skilldir")
echo "$skillname"
done
echo ""
echo "✅ Installation complete!"
echo ""
echo "📊 Results:"
echo "$skill_count skills installed"
echo " • Location: $INSTALL_DIR"
echo ""
# Verify installation
echo "🔍 Verifying installation..."
skill_files=$(find "$INSTALL_DIR" -name "SKILL.md" | wc -l)
echo " ✅ Found $skill_files SKILL.md files"
echo ""
# List installed skills
echo "📋 Installed skills:"
ls -1 "$INSTALL_DIR" | while read skill; do
if [ -f "$INSTALL_DIR/$skill/SKILL.md" ]; then
echo "$skill"
fi
done
echo ""
# Next steps
echo "🚀 Next steps:"
echo ""
echo "=== NEXT STEPS ==="
echo "1. Create your first garden:"
echo " openclaw invoke $INSTALL_DIR/orto-init/SKILL.md \\"
echo " --id orto_mytown_001 \\"
echo " --name 'My Garden' \\"
echo " --provincia Roma \\"
echo " --regione Lazio \\"
echo " --lat 41.8782 \\"
echo " --lon 12.4922"
echo " openclaw invoke $TARGET_DIR/orto-init/SKILL.md --id orto_mytown_001 ..."
echo ""
echo "2. Run onboarding (collect profile):"
echo " openclaw invoke $INSTALL_DIR/orto-onboarding/SKILL.md \\"
echo " --orto-id orto_mytown_001"
echo "2. Run onboarding:"
echo " openclaw invoke $TARGET_DIR/orto-onboarding/SKILL.md --orto-id orto_mytown_001"
echo ""
echo "3. Generate full plan:"
echo " openclaw invoke $INSTALL_DIR/orto-orchestratore/SKILL.md \\"
echo " --orto-id orto_mytown_001"
echo ""
echo "4. Check output:"
echo " ~/.openclaw/workspace/Orti/orto_mytown_001/"
echo ""
echo " openclaw invoke $TARGET_DIR/orto-orchestratore/SKILL.md --orto-id orto_mytown_001"
echo "📖 For documentation, see:"
echo " • README.md"
echo " • INSTALLATION_GUIDE.md"
echo " • INDEX.md"
echo ""
echo "🌱 Happy gardening!"
echo ""
exit 0