#!/bin/bash # First Agent Template Setup Script # This script sets up the virtual environment and installs dependencies echo "🚀 Setting up First Agent Template..." # Check if Python 3 is installed if ! command -v python3 &> /dev/null; then echo "❌ Python 3 is not installed. Please install Python 3.8 or higher." exit 1 fi # Check if virtual environment already exists if [ -d "venv" ]; then echo "⚠️ Virtual environment already exists." read -p "Do you want to recreate it? (y/N): " -n 1 -r echo if [[ $REPLY =~ ^[Yy]$ ]]; then echo "🗑️ Removing existing virtual environment..." rm -rf venv else echo "✅ Using existing virtual environment." echo "To activate: source venv/bin/activate" exit 0 fi fi # Create virtual environment echo "📦 Creating virtual environment..." python3 -m venv venv # Activate virtual environment echo "🔧 Activating virtual environment..." source venv/bin/activate # Upgrade pip echo "⬆️ Upgrading pip..." pip install --upgrade pip # Install dependencies echo "📚 Installing dependencies..." pip install -r requirements.txt echo "" echo "✅ Setup complete!" echo "" echo "To activate the virtual environment:" echo " source venv/bin/activate" echo "" echo "To run the application:" echo " python app.py" echo "" echo "To deactivate the virtual environment:" echo " deactivate"